<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.1 (Ruby 3.2.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-parecki-oauth-first-party-apps-00" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.18.2 -->
  <front>
    <title abbrev="OAuth for First-Party Apps">OAuth 2.0 for First-Party Applications</title>
    <seriesInfo name="Internet-Draft" value="draft-parecki-oauth-first-party-apps-00"/>
    <author fullname="Aaron Parecki">
      <organization>Okta</organization>
      <address>
        <email>aaron@parecki.com</email>
      </address>
    </author>
    <author fullname="George Fletcher">
      <organization>Capital One Financial</organization>
      <address>
        <email>george.fletcher@capitalone.com</email>
      </address>
    </author>
    <author fullname="Pieter Kasselman">
      <organization>Microsoft</organization>
      <address>
        <email>pieter.kasselman@microsoft.com</email>
      </address>
    </author>
    <date year="2023" month="October" day="20"/>
    <area>Security</area>
    <workgroup>Web Authorization Protocol</workgroup>
    <keyword>native apps</keyword>
    <keyword>first-party</keyword>
    <keyword>oauth</keyword>
    <abstract>
      <?line 85?>

<t>This document defines the Authorization Challenge Endpoint, which supports
a first-party client that wants to control the process of
obtaining authorization from the user using a native experience.</t>
      <t>In many cases, this can provide an entirely browserless OAuth 2.0 experience suited for native
applications, only delegating to the browser in unexpected, high risk, or error conditions.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://aaronpk.github.io/oauth-first-party-apps/draft-parecki-oauth-first-party-apps.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-parecki-oauth-first-party-apps/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Web Authorization Protocol Working Group mailing list (<eref target="mailto:oauth@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/oauth/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/oauth/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/aaronpk/oauth-first-party-apps"/>.</t>
    </note>
  </front>
  <middle>
    <?line 95?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>This document extends the OAuth 2.0 Authorization Framework <xref target="RFC6749"/> with
a new endpoint, <tt>authorization_challenge_endpoint</tt>, to support first-party
applications that want to control the process of obtaining authorization from
the user using a native experience.</t>
      <t>The client collects any initial information from the user and POSTs that information
as well as information about the client's request to the Authorization Challenge Endpoint,
and receives either an authorization code or an error code in response. The error code
may indicate that the client can continue to prompt the user for more information,
or can indicate that the client needs to launch a browser to have the user complete
the flow in a browser.</t>
      <t>The Authorization Challenge Endpoint is used to initiate the OAuth flow in place of redirecting
or launching a browser to the authorization endpoint.</t>
      <t>While a fully-delegated approach using the redirect-based Authorization Code grant is generally
preferred, this draft provides a mechanism for the client to directly interact
with the user. This requires a high degree of trust between the authorization server
and the client, as there typically is for first-party applications.
It should only be considered when there are usability
concerns with a redirect-based approach, such as for native mobile or desktop applications.</t>
      <t>This draft also extends the token response (typically for use in response to a refresh token request) and resource server response to allow the authorization server or resource server to indicate that the client should re-request authorization from the user. This can include requesting step-up authentication by including parameters defined in <xref target="I-D.ietf-oauth-step-up-authn-challenge"/> as well.</t>
      <section anchor="usage-and-applicability">
        <name>Usage and Applicability</name>
        <t>This specification <bcp14>MUST</bcp14> only be used by first-party applications, which is when the authorization server and application are operated by the same entity and the user understands them both as the same entity.</t>
        <t>This specification <bcp14>MUST NOT</bcp14> be used by third party applications, and the authorization server <bcp14>SHOULD</bcp14> take measures to prevent use by third party applications. (e.g. only enable this grant for certain client IDs, and take measures to authenticate first-party apps when possible.)</t>
        <t>Using this specification in scenarios other than those described will lead to unintended security and privacy problems for users and service providers.</t>
        <t>This specification is designed to be used by first-party native applications, which includes both mobile and desktop applications.</t>
        <t>If you provide multiple apps and expect users to use multiple apps on the same device, there may be better ways of sharing a user's login between the apps other than each app implementing this specification or using an SDK that implements this specification. For example, <xref target="OpenID.Native-SSO"/> provides a mechanism for one app to obtain new tokens by exchanging tokens from another app, without any user interaction. See <xref target="multiple-applications"/> for more details.</t>
      </section>
      <section anchor="limitations-of-this-specification">
        <name>Limitations of this specification</name>
        <t>The scope of this specification is limited to first-party applications. Please review the entirety of <xref target="security-considerations"/>, and when more than one first-party application is supported, <xref target="multiple-applications"/>.</t>
        <t>While this draft provides the framework for a native OAuth experience, each implementation
will need to define the specific behavior that it expects from OAuth clients interacting with the authorization server. While this lack of clearly defining the details would typically lead to less interoperability, it is acceptable in this case since we intend this specification to be deployed in a tightly coupled environment since it is only applicable to first-party applications.</t>
      </section>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

<section anchor="terminology">
        <name>Terminology</name>
        <t>This specification uses the terms "Access Token", "Authorization Code",
"Authorization Endpoint", "Authorization Server" (AS), "Client", "Client Authentication",
"Client Identifier", "Client Secret", "Grant Type", "Protected Resource",
"Redirection URI", "Refresh Token", "Resource Owner", "Resource Server" (RS)
and "Token Endpoint" defined by <xref target="RFC6749"/>.</t>
        <t>TODO: Replace RFC6749 references with OAuth 2.1</t>
      </section>
    </section>
    <section anchor="protocol-overview">
      <name>Protocol Overview</name>
      <t>There are three primary ways this specification extends various parts of an OAuth system.</t>
      <section anchor="initial-authorization-request">
        <name>Initial Authorization Request</name>
        <artwork type="ascii-art"><![CDATA[
                                                +-------------------+
                                                |   Authorization   |
                          (B)Authorization      |      Server       |
             +----------+    Challenge Request  |+-----------------+|
(A)Client+---|  First-  |---------------------->||  Authorization  ||
   Starts|   |  Party   |                       ||   Challenge     ||
   Flow  +-->|  Client  |<----------------------||    Endpoint     ||
             |          | (C)Authorization      ||                 ||
             |          |    Error Response     ||                 ||
             |          |         :             ||                 ||
             |          |         :             ||                 ||
             |          | (D)Authorization      ||                 ||
             |          |    Challenge Request  ||                 ||
             |          |---------------------->||                 ||
             |          |                       ||                 ||
             |          |<----------------------||                 ||
             |          | (E) Authorization     |+-----------------+|
             |          |     Code Response     |                   |
             |          |                       |                   |
             |          |                       |                   |
             |          |                       |                   |
             |          | (F) Token             |                   |
             |          |     Request           |+-----------------+|
             |          |---------------------->||      Token      ||
             |          |                       ||     Endpoint    ||
             |          |<----------------------||                 ||
             |          | (G) Access Token      |+-----------------+|
             |          |                       |                   |
             +----------+                       +-------------------+
]]></artwork>
        <t>Figure: First-Party Client Authorization Code Request</t>
        <ul spacing="normal">
          <li>
            <t>(A) The first-party client starts the flow, by presenting the user with a "sign in" button, or collecting information from the user, such as their email address or username.</t>
          </li>
          <li>
            <t>(B) The client initiates the authorization request by making a POST request to the Authorization Challenge Endpoint, optionally with information collected from the user (e.g. email or username)</t>
          </li>
          <li>
            <t>(C) The authorization server determines whether the information provided to the Authorization Challenge Endpoint is sufficient to grant authorization, and either responds with an authorization code or responds with an error. In this example, it determines that additional information is needed and responds with an error. The error may contain additional information to guide the Client on what information to collect next. This pattern of collecting information, submitting it to the Authorization Challenge Endpoint and then receing an error or authorization code may repeat several times.</t>
          </li>
          <li>
            <t>(D) The client gathers additional information (e.g. signed passkey challenge, or one-time code from email) and makes a POST request to the Authorization Challenge Endpoint.</t>
          </li>
          <li>
            <t>(E) The Authorization Challenge Endpoint returns an authorization code.</t>
          </li>
          <li>
            <t>(F) The client sends the authorization code received in step (E) to obtain a token from the Token Endpoint.</t>
          </li>
          <li>
            <t>(G) The Authorization Server returns an Access Token from the Token Endpoint.</t>
          </li>
        </ul>
      </section>
      <section anchor="refresh-token-request">
        <name>Refresh Token Request</name>
        <t>When the client uses a refresh token to obtain a new access token, the authorization server <bcp14>MAY</bcp14> respond with an error to indicate that re-authorization of the user is required.</t>
      </section>
      <section anchor="resource-request">
        <name>Resource Request</name>
        <t>When making a resource request to a resource server, the resource server <bcp14>MAY</bcp14> respond with an error according to OAuth 2.0 Step-Up Authentication Challenge Protocol <xref target="I-D.ietf-oauth-step-up-authn-challenge"/>, indicating that re-authorization of the user is required.</t>
      </section>
    </section>
    <section anchor="protocol-endpoints">
      <name>Protocol Endpoints</name>
      <section anchor="authorization-challenge-endpoint">
        <name>Authorization Challenge Endpoint</name>
        <t>The authorization challenge endpoint is a new endpoint defined by this specification which the first-party application uses to obtain an authorization code.</t>
        <t>The authorization challenge endpoint is an HTTP API at the authorization server that accepts HTTP POST requests with parameters in the HTTP request message body using the <tt>application/x-www-form-urlencoded</tt> format. This format has a character encoding of UTF-8, as described in Appendix B of <xref target="RFC6749"/>. The authorization challenge endpoint URL <bcp14>MUST</bcp14> use the "https" scheme.</t>
        <t>If the authorization server requires client authentication for this client on the Token Endpoint, then the authorization server <bcp14>MUST</bcp14> also require client authentication for this client on the Authorization Challenge Endpoint. See <xref target="client-authentication"/> for more details.</t>
        <t>Authorization servers supporting this specification <bcp14>SHOULD</bcp14> include the URL of their authorization challenge endpoint in their authorization server metadata document <xref target="RFC8414"/> using the <tt>authorization_challenge_endpoint</tt> parameter as defined in <xref target="authorization-server-metadata"/>.</t>
        <t>The endpoint accepts the authorization request parameters defined in <xref target="RFC6749"/> for the authorization endpoint as well
as all applicable extensions defined for the authorization endpoint. Some examples of such extensions include Proof
Key for Code Exchange (PKCE) <xref target="RFC7636"/>, Resource Indicators <xref target="RFC8707"/>, and OpenID Connect <xref target="OpenID"/>. It is
important to note that some extension parameters have meaning in a web context but don't have meaning in a native
mechanism (e.g. <tt>response_mode=query</tt>). It is out of scope as to what the AS does in the case that an extension
defines a parameter that is has no meaning in this use case.</t>
        <t>The client initiates the authorization flow with or without information collected from the user (e.g. a signed passkey challenge or MFA code).</t>
        <t>The authorization challenge endpoint response is either an authorization code or an error code, and may also contain a <tt>auth_session</tt> which the client uses on subsequent requests to the authorization challenge endpoint.</t>
      </section>
      <section anchor="token-endpoint">
        <name>Token endpoint</name>
        <t>The token endpoint is used by the client to obtain an access token by
presenting its authorization grant or refresh token, as described in
Section 3.2 of OAuth 2.0 <xref target="RFC6749"/>.</t>
        <t>This specification extends the token endpoint response to allow the authorization
server to indicate that further authentication of the user is required.</t>
      </section>
    </section>
    <section anchor="authorization-initiation">
      <name>Authorization Initiation</name>
      <t>A client may wish to initiate an authorization flow by first prompting the user for their user identifier or other account information. The authorization challenge endpoint is a new endpoint to collect this login hint and direct the client with the next steps, whether that is to do an MFA flow, or perform an OAuth redirect-based flow.</t>
      <t>In order to preserve the security of this specification, the Authorization Server <bcp14>MUST</bcp14> verify the "first-partyness" of the client before continuing with the authentication flow. Please see <xref target="first-party-applications"/> for additional considerations.</t>
      <section anchor="challenge-request">
        <name>Authorization Challenge Request</name>
        <t>The client makes a request to the authorization challenge endpoint by adding the
following parameters, as well as parameters from any extensions, using the <tt>application/x-www-form-urlencoded</tt>
format with a character encoding of UTF-8 in the HTTP request body:</t>
        <dl>
          <dt>"client_id":</dt>
          <dd>
            <t><bcp14>REQUIRED</bcp14> if the client is not authenticating with the
authorization server and if no <tt>auth_session</tt> is included.</t>
          </dd>
          <dt>"scope":</dt>
          <dd>
            <t><bcp14>OPTIONAL</bcp14>. The OAuth scope defined in <xref target="RFC6749"/>.</t>
          </dd>
          <dt>"acr_values":</dt>
          <dd>
            <t><bcp14>OPTIONAL</bcp14>. The acr_values requested by the client.</t>
          </dd>
          <dt>"auth_session":</dt>
          <dd>
            <t><bcp14>OPTIONAL</bcp14>. If the client has previously obtained a auth session, described in <xref target="auth-session"/>.</t>
          </dd>
        </dl>
        <t>Specific implementations as well as extensions to this specification <bcp14>MAY</bcp14> define additional parameters to be used at this endpoint.</t>
        <t>For example, the client makes the following request to initiate a flow
given the user's phone number, line breaks shown for illustration purposes only:</t>
        <artwork><![CDATA[
POST /authorize HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded

login_hint=%2B1-310-123-4567&scope=profile
&client_id=bb16c14c73415
]]></artwork>
      </section>
      <section anchor="challenge-response">
        <name>Authorization Challenge Response</name>
        <t>The authorization server determines whether the information provided up to this point is sufficient to issue an authorization code, and if so responds with an authorization code. If the information is not sufficient for issuing an authorization code, then the authorization server <bcp14>MUST</bcp14> respond with an error response.</t>
        <section anchor="authorization-code-response">
          <name>Authorization Code Response</name>
          <t>The authorization server issues an authorization code
by creating an HTTP response content using the <tt>application/json</tt>
media type as defined by <xref target="RFC8259"/> with the following parameters
and an HTTP 200 (OK) status code:</t>
          <dl>
            <dt>"authorization_code":</dt>
            <dd>
              <t><bcp14>REQUIRED</bcp14>. The authorization code issued by the authorization server.</t>
            </dd>
          </dl>
          <t>For example,</t>
          <artwork><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store

{
  "authorization_code": "uY29tL2F1dGhlbnRpY"
}
]]></artwork>
        </section>
        <section anchor="redirect-response">
          <name>Redirect Response</name>
          <t>In the case where the authorization server wishes to interact with the
user directly, it can return the <tt>redirect</tt> response. The authorization
server may choose to interact directly with the user based on a risk
assesment, the introduction of a new authentication method not supported
in the application, or to handle an exception flow like account recovery.
In this case the client is expected to initiate a traditional OAuth
Authorization Code flow with PKCE according to <xref target="RFC6749"/> and <xref target="RFC7636"/>.</t>
          <dl>
            <dt>"redirect":</dt>
            <dd>
              <t><bcp14>REQUIRED</bcp14>. A Pushed Authroization Request (PAR) response as defined in
Section 2.2 of <xref target="RFC9126"/>. The request_uri parameter contains the URI that
the client should use in the authorization request.</t>
            </dd>
          </dl>
        </section>
        <section anchor="challenge-error-response">
          <name>Error Response</name>
          <t>If the request contains invalid parameters or incorrect data,
the authorization server responds with an HTTP 400 (Bad Request)
status code (unless specified otherwise) and includes the following
parameters with the response:</t>
          <dl>
            <dt>"error":</dt>
            <dd>
              <t><bcp14>REQUIRED</bcp14>.  A single ASCII <xref target="USASCII"/> error code from the following:
</t>
              <dl>
                <dt>"invalid_request":</dt>
                <dd>
                  <t>The request is missing a required parameter, includes an
unsupported parameter value,
repeats a parameter, includes multiple credentials,
utilizes more than one mechanism for authenticating the
client, or is otherwise malformed.</t>
                </dd>
                <dt>"invalid_client":</dt>
                <dd>
                  <t>Client authentication failed (e.g., unknown client, no
client authentication included, or unsupported
authentication method).  The authorization server <bcp14>MAY</bcp14>
return an HTTP 401 (Unauthorized) status code to indicate
which HTTP authentication schemes are supported.  If the
client attempted to authenticate via the <tt>Authorization</tt>
request header field, the authorization server <bcp14>MUST</bcp14>
respond with an HTTP 401 (Unauthorized) status code and
include the <tt>WWW-Authenticate</tt> response header field
matching the authentication scheme used by the client.</t>
                </dd>
                <dt>"invalid_grant":</dt>
                <dd>
                  <t>The provided authorization grant or <tt>auth_session</tt> is
invalid, expired, revoked, or is otherwise invalid.</t>
                </dd>
                <dt>"unauthorized_client":</dt>
                <dd>
                  <t>The authenticated client is not authorized to use this
authorization grant type.</t>
                </dd>
                <dt>"invalid_scope":</dt>
                <dd>
                  <t>The requested scope is invalid, unknown, malformed, or
exceeds the scope granted by the resource owner.</t>
                </dd>
              </dl>
              <t>Values for the <tt>error</tt> parameter <bcp14>MUST NOT</bcp14> include characters
outside the set %x20-21 / %x23-5B / %x5D-7E.</t>
              <t>The authorization server <bcp14>MAY</bcp14> extend these error codes with custom
messages based on the requirements of the authorization server.</t>
            </dd>
            <dt>"error_description":</dt>
            <dd>
              <t><bcp14>OPTIONAL</bcp14>.  Human-readable ASCII <xref target="USASCII"/> text providing
additional information, used to assist the client developer in
understanding the error that occurred.
Values for the <tt>error_description</tt> parameter <bcp14>MUST NOT</bcp14> include
characters outside the set %x20-21 / %x23-5B / %x5D-7E.</t>
            </dd>
            <dt>"error_uri":</dt>
            <dd>
              <t><bcp14>OPTIONAL</bcp14>.  A URI identifying a human-readable web page with
information about the error, used to provide the client
developer with additional information about the error.
Values for the <tt>error_uri</tt> parameter <bcp14>MUST</bcp14> conform to the
URI-reference syntax and thus <bcp14>MUST NOT</bcp14> include characters
outside the set %x21 / %x23-5B / %x5D-7E.</t>
            </dd>
            <dt>"auth_session":</dt>
            <dd>
              <t><bcp14>OPTIONAL</bcp14>.  The auth session allows the authorization server to
associate subsequent requests by this client with an ongoing
authorization request sequence. The client <bcp14>MUST</bcp14> include
the <tt>auth_session</tt> in follow-up requests to the challenge
endpoint if it receives one along with the error response.</t>
            </dd>
          </dl>
          <t>This specification requires the authorization server to define new
error codes that relate to the actions the client must take in order
to properly authenticate the user. These new error codes are specific
to the authorization server's implementation of this specification and are
intentionally left out of scope.</t>
          <t>The parameters are included in the content of the HTTP response
using the <tt>application/json</tt> media type as defined by <xref target="RFC7159"/>.  The
parameters are serialized into a JSON structure by adding each
parameter at the highest structure level.  Parameter names and string
values are included as JSON strings.  Numerical values are included
as JSON numbers.  The order of parameters does not matter and can
vary.</t>
          <t>The authorization server <bcp14>MAY</bcp14> define additional parameters in the response
depending on the implmentation. The authorization server <bcp14>MAY</bcp14> also define
more specific content types for the error responses as long as the response
is JSON and conforms to <tt>application/&lt;as-defined&gt;+json</tt>.</t>
        </section>
      </section>
      <section anchor="auth-session">
        <name>Auth Session</name>
        <t>The <tt>auth_session</tt> is a value that the authorization server issues in order to be able to associate subsequent requests from the same client. It is intended to be analagous to how a browser cookie associates multiple requests by the same browser to the authorization server.</t>
        <t>The <tt>auth_session</tt> value is completely opaque to the client, and as such the AS <bcp14>MUST</bcp14> adequately protect the value from inspection by the client, for example by using a random stringo using a JWE if the AS is not maintaining state on the backend.</t>
        <t>If the client has an <tt>auth_session</tt>, the client <bcp14>MUST</bcp14> include it in future requests to the authorization challenge endpoint. The client <bcp14>MUST</bcp14> store the <tt>auth_session</tt> beyond the issuance of the authorization code to be able to use it in future requests.</t>
        <t>Every response defined by this specification may include a new <tt>auth_session</tt> value. Clients <bcp14>MUST NOT</bcp14> assume that <tt>auth_session</tt> values are static, and <bcp14>MUST</bcp14> be prepared to update the stored <tt>auth_session</tt> value if one is received in a response.</t>
        <t>See <xref target="auth-session-security"/> for additional security considerations.</t>
      </section>
    </section>
    <section anchor="token-request">
      <name>Token Request</name>
      <t>The client makes a request to the token endpoint using the authorization code it obtained from the authorization challenge endpoint.</t>
      <t>This specification does not define any additional parameters beyond the token request parameters defined in  Section 4.1.3 of <xref target="RFC6749"/>. However, notably the <tt>redirect_uri</tt> parameter will not be included in this request, because no <tt>redirect_uri</tt> parameter was included in the authorization request.</t>
      <section anchor="token-endpoint-successful-response">
        <name>Token Endpoint Successful Response</name>
        <t>This specification extends the OAuth 2.0 <xref target="RFC6749"/> token response
defined in Section 5.1 with the additional parameter <tt>auth_session</tt>, defined in <xref target="auth-session"/>.</t>
        <t>The response <bcp14>MAY</bcp14> include an <tt>auth_session</tt> parameter which the client is expected to include on a subsequent request to the authorization challenge endpoint. The <tt>auth_session</tt> parameter <bcp14>MAY</bcp14> also be included even if the authorization code was obtained through a traditional OAuth authorization code flow rather than the flow defined by this specification.</t>
        <t>An example successful token response is below:</t>
        <artwork><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
  "access_token": "2YotnFZFEjr1zCsicMWpAA",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "tGzv3JOkF0XG5Qx2TlKWIA",
  "auth_session": "uY29tL2F1dGhlbnRpY"
}
]]></artwork>
      </section>
      <section anchor="token-endpoint-error-response">
        <name>Token Endpoint Error Response</name>
        <t>Upon any request to the token endpoint, including a request with a valid refresh token,
the authorization server can respond with an authorization challenge instead of a successful access token response.</t>
        <t>An authorization challenge error response is a particular type of
error response as defined in Section 5.2 of OAuth 2.0 <xref target="RFC6749"/> where
the error code is set to the following value:</t>
        <dl>
          <dt>"error": "authorization_required":</dt>
          <dd>
            <t>The authorization grant is insufficiently authorized, but another
access token request may succeed if an additional authorization
grant is presented.</t>
          </dd>
        </dl>
        <t>Additionally, the response <bcp14>MAY</bcp14> contain an <tt>auth_session</tt> parameter which the client is expected to include on a subsequent request to the authorization challenge endpoint.</t>
        <dl>
          <dt>"auth_session":</dt>
          <dd>
            <t><bcp14>OPTIONAL</bcp14>.  The optional auth session value allows the authorization server to
associate subsequent requests by this client with an ongoing
authorization request sequence. The client <bcp14>MUST</bcp14> include
the <tt>auth_session</tt> in follow-up requests to the challenge
endpoint if it receives one along with the error response.</t>
          </dd>
        </dl>
        <t>For example:</t>
        <artwork><![CDATA[
HTTP/1.1 403 Forbidden
Content-Type: application/json
Cache-Control: no-store

{
  "error": "authorization_required",
  "auth_session": "uY29tL2F1dGhlbnRpY"
}
]]></artwork>
      </section>
    </section>
    <section anchor="resource-server-error-response">
      <name>Resource Server Error Response</name>
      <t>Step-Up Authentication <xref target="I-D.ietf-oauth-step-up-authn-challenge"/> defines a mechanism for resource servers to tell the client to start a new authorization request, including <tt>acr_values</tt> and <tt>max_age</tt>, and <tt>scope</tt> from RFC6750. Upon receiving this request, the client starts a new authorization request according to this specification, and includes the <tt>acr_values</tt>, <tt>max_age</tt> and <tt>scope</tt> returned in the error response.</t>
      <t>This specification does not define any new parameters for the resource server error response beyond those defined in <xref target="I-D.ietf-oauth-step-up-authn-challenge"/>.</t>
    </section>
    <section anchor="authorization-server-metadata">
      <name>Authorization Server Metadata</name>
      <t>The following authorization server metadata parameters <xref target="RFC8414"/> are introduced to signal the server's capability and policy with respect to first-party applications.</t>
      <dl>
        <dt>"authorization_challenge_endpoint":</dt>
        <dd>
          <t>The URL of the authorization challenge endpoint at which a client can initiate
an authorization request and eventually obtain an authorization code.</t>
        </dd>
      </dl>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <section anchor="first-party-applications">
        <name>First-Party Applications</name>
        <t>First-party applications are applications that the user recognizes as belonging to the same brand as the authorization server. For example, a bank publishing their own mobile application.</t>
        <t>Because this specification enables a client application to interact directly with the end user, and the application handles sending any information collected from the user to the authorization server, it is expected to be used only for first-party applications when the authorization server also has a high degree of trust of the client.</t>
        <t>This specification is not prescriptive on how the Authorization Server establishes it's trust in the first-partyness of the application. For mobile platforms, most support some mechanism for application attestation that can be used to identify the entity that created/signed/uploaded the app to the app store. App attestation can be combined with other mechanisms like Dynamic Client Registration <xref target="RFC7591"/> to enable strong client authentication in addition to client verification (first-partyness). The exact steps required are out of scope for this specification. Note that applications running inside a browser (e.g. Single Page Apps) context it is much more difficult to verify the first-partyness of the client. Please see <xref target="single-page-apps"/> for additional details.</t>
      </section>
      <section anchor="phishing">
        <name>Phishing</name>
        <t>There are two ways using this specification increases the risk of phishing.</t>
        <t>With this specification, the client interacts directly with the end user, collecting information provided by the user and sending it to the authorization server. If an attacker impersonates the client and successfully tricks a user into using it, they may not realize they are giving their credentials to the malicious application.</t>
        <t>In a traditional OAuth deployment using the redirect-based authorization code flow, the user will only ever enter their credentials at the authorization server, and it is straightforward to explain to avoid entering credentials in other "fake" websites. By introducing a new place the user is expected to enter their credentials using this specification, it is more complicated to teach users how to recognize other fake login prompts that might be attempting to steal their credentials.</t>
        <t>Because of these risks, the authorization server <bcp14>MAY</bcp14> decide to require that the user go through a redirect-based flow at any stage of the process based on its own risk assessment.</t>
      </section>
      <section anchor="credential-attacks">
        <name>Credential Stuffing Attacks</name>
        <t>The authorization challenge endpoint is capable of directly receiving user credentials and returning authorization codes. This exposes a new vector to perform credential stuffing attacks, if additional measures are not taken to ensure the authenticity of the application.</t>
        <t>An authorization server may already have a combination of built-in or 3rd party security tools in place to monitor and reduce this risk in browser-based authentication flows. Implementors <bcp14>SHOULD</bcp14> consider similar security measures to reduce this risk in the authorization challenge endpoint. Additionally, the attestation APIs <bcp14>SHOULD</bcp14> be used when possible to assert a level of confidence to the authorization server that the request is originating from an application owned by the same party.</t>
      </section>
      <section anchor="client-authentication">
        <name>Client Authentication</name>
        <t>Typically, mobile and desktop applications are considered "public clients" in OAuth, since they cannot be shipped with a statically configured set of client credentials <xref target="RFC8252"/>. Because of this, client impersonation should be a concern of anyone deploying this pattern. Without client authentication, a malicious user or attacker can mimick the requests the application makes to the authorization server, pretending to be the legitimate client.</t>
        <t>Because this specification is intended for first-party applications, it is likely that the intent is to also avoid prompting the user with a consent screen as recommended by <xref target="RFC6749"/>.</t>
        <t>Implementers <bcp14>SHOULD</bcp14> consider additional measures to limit the risk of client impersonation, such as using attestation APIs available from the operating system.</t>
      </section>
      <section anchor="sender-constrained-tokens">
        <name>Sender Constrained Tokens</name>
        <t>Tokens issued in response to an authorization challenge request <bcp14>SHOULD</bcp14> be sender constrained to mitigate the risk of token theft and replay.</t>
        <t>Proof-of-Possession techniques constrain tokens by binding them to a cryptographic key. Whenever the token is presented, it <bcp14>MUST</bcp14> be accompanied by a proof that the client presenting the token also controls the cryptographic key bound to the token. If a proof-of-possession sender constrained token is presented without valid proof of possession of the cryptographic key, it <bcp14>MUST</bcp14> be rejected.</t>
        <section anchor="dpop-demonstrating-proof-of-possession">
          <name>DPoP: Demonstrating Proof-of-Possession</name>
          <t>DPoP (<xref target="RFC9449"/>) is an application-level mechanism for sender-constraining OAuth <xref target="RFC6749"/> access and refresh tokens. If DPoP is used to sender constrain tokens, the client <bcp14>SHOULD</bcp14> use DPoP for every token request to the Authorization Server and interaction with the Resource Server.</t>
          <t>DPoP includes an optional capability to bind the authorization code to the DPoP key to enable end-to-end binding of the entire authorization flow. Given the back-channel nature of this specification, there are far fewer opportunities for an attacker to access the authorization code and PKCE code verifier compared to the redirect-based Authorization Code Flow. In this specification, the Authorization Code is obtained via a back-channel request. Despite this, omitting Authorization Code binding leaves a gap in the end-to-end protection that DPoP provides, so DPoP Authorization Code binding <bcp14>SHOULD</bcp14> be used.</t>
          <t>To bind the authorization code using the Authorization Challenge Endpoint, the JWK Thumbprint of the DPoP key <bcp14>MUST</bcp14> be communicated to the Authorization Server by including the <tt>dpop_jkt</tt> parameter defined in section 10 of <xref target="RFC9449"/> alongside other authorization request parameters in the POST body of the first Authorization Challenge Request. If it is included in subsequent Authorization Challenge Requests, the value of this parameter must be the same as in the initial request. If the JWK Thumbprint in the <tt>dpop_jkt</tt> differ at any point, the Authorization Server <bcp14>MUST</bcp14> reject the request. If the <tt>dpop_jkt</tt> parameter is not included in the first request, but added in subsequent requests, the Authorization Server <bcp14>MUST</bcp14> reject the request (do we need to define a specific error code for that?).</t>
        </section>
        <section anchor="other-proof-of-possession-mechanisms">
          <name>Other Proof of Possession Mechanisms</name>
          <t>It may be possible to use other proof of possession mechanisms to sender constrain access and refresh tokens. Defining these mechanisms are out of scope for this specification.</t>
        </section>
      </section>
      <section anchor="auth-session-security">
        <name>Auth Session</name>
        <section anchor="auth-session-dpop-binding">
          <name>Auth Session DPoP Binding</name>
          <t>If the client and authorization server are using DPoP binding of access tokens and/or authorization codes, then they <bcp14>SHOULD</bcp14> also require DPoP binding of the <tt>auth_session</tt> value as well.</t>
          <t>DPoP binding of the <tt>auth_session</tt> value ensures that the context referenced by the <tt>auth_session</tt> cannot be stolen and reused by another device.</t>
          <t>This specification defines an additional claim in the DPoP Proof JWT Syntax defined in Section 4.2 of <xref target="RFC9449"/>:</t>
          <dl>
            <dt>"ash":</dt>
            <dd>
              <t>The hash of the <tt>auth_session</tt>. The value <bcp14>MUST</bcp14> be the result of a base64url encoding (as defined in Section 2 of <xref target="RFC7515"/>) the SHA-256 <xref target="SHS"/> hash of the ASCII encoding of the <tt>auth_session</tt> value.</t>
            </dd>
          </dl>
        </section>
        <section anchor="auth-session-lifetime">
          <name>Auth Session Lifetime</name>
          <t>This specification makes no requirements or assumptions on the lifetime of the <tt>auth_session</tt> value. The lifetime and expiration is at the discretion of the authorization server, and the authorization server may choose to invalidate the value for any reason such as scheduled expiration, security events, or revocation events.</t>
          <t>Clients <bcp14>MUST NOT</bcp14> make any assumptions or depend on any particular lifetime of the <tt>auth_session</tt> value.</t>
        </section>
      </section>
      <section anchor="multiple-applications">
        <name>Multiple Applications</name>
        <t>When there is more than one first-party applications supported by the AS, then it is important to consider a number of additional risks. These risks fall into two main categories: Experience Risk and Technical Risk which are described below.</t>
        <section anchor="user-experience-risk">
          <name>User Experience Risk</name>
          <t>Any time a user is asked to provide the authentication credentials in user experiences that differ, it has the effect of increasing the likelihood that the user will fall prey to a phishing attack because they are used to entering credentials in different looking experiences. When multiple first-party applications are supported, the implementation <bcp14>MUST</bcp14> ensure the native experience is identical across all the first-party applications.</t>
          <t>Another experience risk is user confusion caused by different looking experiences and behaviors. This can increase the likelihood the user will not complete the authentication experience for the first-party application.</t>
        </section>
        <section anchor="technical-risk">
          <name>Technical Risk</name>
          <t>In addition to the experience risks, multiple implementations in first-party applications increases the risk of an incorrect implementation as well as increasing the attack surface as each implementation may expose it's own weaknesses.</t>
        </section>
        <section anchor="mitigation">
          <name>Mitigation</name>
          <t>To address these risk, when multiple first-party applications must be supported, and other methods such as <xref target="OpenID.Native-SSO"/> are not applicable, it is <bcp14>RECOMMENDED</bcp14> that a client-side SDK be used to ensure the implementation is consistent across the different applications and to ensure the user experience is identical for all first-party apps.</t>
        </section>
      </section>
      <section anchor="single-page-apps">
        <name>Single Page Applications</name>
        <t>Single Page Applications (SPA) run in a scripting language inside the context of a browser instance. This environment poses several unique challenges compared to native applications, in particular:</t>
        <ul spacing="normal">
          <li>
            <t>Significant attack vectors due to the possibility of Cross-Site Scripting (XSS) attacks</t>
          </li>
          <li>
            <t>Fewer options to securely attest to the first-partyness of a browser based application</t>
          </li>
        </ul>
        <t>See <xref target="I-D.ietf-oauth-browser-based-apps"/> for a detailed discussion of the risks of XSS attacks in browsers.</t>
        <t>Additionally, the nature of a Single-Page App means the user is already in a browser context, so the user experience cost of doing a full page redirect or a popup window for the traditional OAuth Authorization Code Flow is much less than the cost of doing so in a native application. The complexity and risk of implementing this specification in a browser likely does not outweigh the user experience benefits that would be gained in that context.</t>
        <t>For these reasons, it is <bcp14>NOT RECOMMENDED</bcp14> to use this specification in browser-based applications.</t>
      </section>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <section anchor="oauth-parameters-registration">
        <name>OAuth Parameters Registration</name>
        <t>IANA has (TBD) registered the following values in the IANA "OAuth Parameters" registry of <xref target="IANA.OAuth.Parameters"/> established by <xref target="RFC6749"/>.</t>
        <t><strong>Parameter name</strong>: <tt>auth_session</tt></t>
        <t><strong>Parameter usage location</strong>: token request, token response</t>
        <t><strong>Change Controller</strong>: IETF</t>
        <t><strong>Specification Document</strong>: Section 5.4 of this specification</t>
      </section>
      <section anchor="oauth-server-metadata-registration">
        <name>OAuth Server Metadata Registration</name>
        <t>IANA has (TBD) registered the following values in the IANA "OAuth Authorization Server Metadata" registry of <xref target="IANA.OAuth.Parameters"/> established by <xref target="RFC8414"/>.</t>
        <t><strong>Metadata Name</strong>: <tt>authorization_challenge_endpoint</tt></t>
        <t><strong>Metadata Description</strong>: URL of the authorization server's authorization challenge endpoint.</t>
        <t><strong>Change Controller</strong>: IESG</t>
        <t><strong>Specification Document</strong>: Section 4.1 of [[ this specification ]]</t>
      </section>
      <section anchor="json-web-token-claims-registration">
        <name>JSON Web Token Claims Registration</name>
        <t>IANA has (TBD) registered the following Claims in the "JSON Web Token Claims" registry <xref target="IANA.JWT"/> established by <xref target="RFC7519"/>.</t>
        <t><strong>Auth Session Hash</strong></t>
        <t><strong>Claim Name</strong>: <tt>ash</tt></t>
        <t><strong>Claim Description</strong>: The base64url-encoded SHA-256 hash of the ASCII encoding of the <tt>auth_session</tt> value</t>
        <t><strong>Change Controller</strong>: IETF</t>
        <t><strong>Reference</strong>: Section 9.6.1 of this specification</t>
      </section>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC6749">
          <front>
            <title>The OAuth 2.0 Authorization Framework</title>
            <author fullname="D. Hardt" initials="D." role="editor" surname="Hardt"/>
            <date month="October" year="2012"/>
            <abstract>
              <t>The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf. This specification replaces and obsoletes the OAuth 1.0 protocol described in RFC 5849. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6749"/>
          <seriesInfo name="DOI" value="10.17487/RFC6749"/>
        </reference>
        <reference anchor="RFC7159">
          <front>
            <title>The JavaScript Object Notation (JSON) Data Interchange Format</title>
            <author fullname="T. Bray" initials="T." role="editor" surname="Bray"/>
            <date month="March" year="2014"/>
            <abstract>
              <t>JavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format. It was derived from the ECMAScript Programming Language Standard. JSON defines a small set of formatting rules for the portable representation of structured data.</t>
              <t>This document removes inconsistencies with other specifications of JSON, repairs specification errors, and offers experience-based interoperability guidance.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7159"/>
          <seriesInfo name="DOI" value="10.17487/RFC7159"/>
        </reference>
        <reference anchor="RFC7515">
          <front>
            <title>JSON Web Signature (JWS)</title>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="N. Sakimura" initials="N." surname="Sakimura"/>
            <date month="May" year="2015"/>
            <abstract>
              <t>JSON Web Signature (JWS) represents content secured with digital signatures or Message Authentication Codes (MACs) using JSON-based data structures. Cryptographic algorithms and identifiers for use with this specification are described in the separate JSON Web Algorithms (JWA) specification and an IANA registry defined by that specification. Related encryption capabilities are described in the separate JSON Web Encryption (JWE) specification.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7515"/>
          <seriesInfo name="DOI" value="10.17487/RFC7515"/>
        </reference>
        <reference anchor="RFC7519">
          <front>
            <title>JSON Web Token (JWT)</title>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="N. Sakimura" initials="N." surname="Sakimura"/>
            <date month="May" year="2015"/>
            <abstract>
              <t>JSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties. The claims in a JWT are encoded as a JSON object that is used as the payload of a JSON Web Signature (JWS) structure or as the plaintext of a JSON Web Encryption (JWE) structure, enabling the claims to be digitally signed or integrity protected with a Message Authentication Code (MAC) and/or encrypted.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7519"/>
          <seriesInfo name="DOI" value="10.17487/RFC7519"/>
        </reference>
        <reference anchor="RFC7591">
          <front>
            <title>OAuth 2.0 Dynamic Client Registration Protocol</title>
            <author fullname="J. Richer" initials="J." role="editor" surname="Richer"/>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="M. Machulak" initials="M." surname="Machulak"/>
            <author fullname="P. Hunt" initials="P." surname="Hunt"/>
            <date month="July" year="2015"/>
            <abstract>
              <t>This specification defines mechanisms for dynamically registering OAuth 2.0 clients with authorization servers. Registration requests send a set of desired client metadata values to the authorization server. The resulting registration responses return a client identifier to use at the authorization server and the client metadata values registered for the client. The client can then use this registration information to communicate with the authorization server using the OAuth 2.0 protocol. This specification also defines a set of common client metadata fields and values for clients to use during registration.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7591"/>
          <seriesInfo name="DOI" value="10.17487/RFC7591"/>
        </reference>
        <reference anchor="RFC7636">
          <front>
            <title>Proof Key for Code Exchange by OAuth Public Clients</title>
            <author fullname="N. Sakimura" initials="N." role="editor" surname="Sakimura"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="N. Agarwal" initials="N." surname="Agarwal"/>
            <date month="September" year="2015"/>
            <abstract>
              <t>OAuth 2.0 public clients utilizing the Authorization Code Grant are susceptible to the authorization code interception attack. This specification describes the attack as well as a technique to mitigate against the threat through the use of Proof Key for Code Exchange (PKCE, pronounced "pixy").</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7636"/>
          <seriesInfo name="DOI" value="10.17487/RFC7636"/>
        </reference>
        <reference anchor="RFC8259">
          <front>
            <title>The JavaScript Object Notation (JSON) Data Interchange Format</title>
            <author fullname="T. Bray" initials="T." role="editor" surname="Bray"/>
            <date month="December" year="2017"/>
            <abstract>
              <t>JavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format. It was derived from the ECMAScript Programming Language Standard. JSON defines a small set of formatting rules for the portable representation of structured data.</t>
              <t>This document removes inconsistencies with other specifications of JSON, repairs specification errors, and offers experience-based interoperability guidance.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="90"/>
          <seriesInfo name="RFC" value="8259"/>
          <seriesInfo name="DOI" value="10.17487/RFC8259"/>
        </reference>
        <reference anchor="RFC8414">
          <front>
            <title>OAuth 2.0 Authorization Server Metadata</title>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <author fullname="N. Sakimura" initials="N." surname="Sakimura"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <date month="June" year="2018"/>
            <abstract>
              <t>This specification defines a metadata format that an OAuth 2.0 client can use to obtain the information needed to interact with an OAuth 2.0 authorization server, including its endpoint locations and authorization server capabilities.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8414"/>
          <seriesInfo name="DOI" value="10.17487/RFC8414"/>
        </reference>
        <reference anchor="RFC8707">
          <front>
            <title>Resource Indicators for OAuth 2.0</title>
            <author fullname="B. Campbell" initials="B." surname="Campbell"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="H. Tschofenig" initials="H." surname="Tschofenig"/>
            <date month="February" year="2020"/>
            <abstract>
              <t>This document specifies an extension to the OAuth 2.0 Authorization Framework defining request parameters that enable a client to explicitly signal to an authorization server about the identity of the protected resource(s) to which it is requesting access.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8707"/>
          <seriesInfo name="DOI" value="10.17487/RFC8707"/>
        </reference>
        <reference anchor="RFC9126">
          <front>
            <title>OAuth 2.0 Pushed Authorization Requests</title>
            <author fullname="T. Lodderstedt" initials="T." surname="Lodderstedt"/>
            <author fullname="B. Campbell" initials="B." surname="Campbell"/>
            <author fullname="N. Sakimura" initials="N." surname="Sakimura"/>
            <author fullname="D. Tonge" initials="D." surname="Tonge"/>
            <author fullname="F. Skokan" initials="F." surname="Skokan"/>
            <date month="September" year="2021"/>
            <abstract>
              <t>This document defines the pushed authorization request (PAR) endpoint, which allows clients to push the payload of an OAuth 2.0 authorization request to the authorization server via a direct request and provides them with a request URI that is used as reference to the data in a subsequent call to the authorization endpoint.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9126"/>
          <seriesInfo name="DOI" value="10.17487/RFC9126"/>
        </reference>
        <reference anchor="RFC9449">
          <front>
            <title>OAuth 2.0 Demonstrating Proof of Possession (DPoP)</title>
            <author fullname="D. Fett" initials="D." surname="Fett"/>
            <author fullname="B. Campbell" initials="B." surname="Campbell"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="T. Lodderstedt" initials="T." surname="Lodderstedt"/>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <author fullname="D. Waite" initials="D." surname="Waite"/>
            <date month="September" year="2023"/>
            <abstract>
              <t>This document describes a mechanism for sender-constraining OAuth 2.0 tokens via a proof-of-possession mechanism on the application level. This mechanism allows for the detection of replay attacks with access and refresh tokens.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9449"/>
          <seriesInfo name="DOI" value="10.17487/RFC9449"/>
        </reference>
        <reference anchor="I-D.ietf-oauth-step-up-authn-challenge">
          <front>
            <title>OAuth 2.0 Step Up Authentication Challenge Protocol</title>
            <author fullname="Vittorio Bertocci" initials="V." surname="Bertocci">
              <organization>Auth0/Okta</organization>
            </author>
            <author fullname="Brian Campbell" initials="B." surname="Campbell">
              <organization>Ping Identity</organization>
            </author>
            <date day="26" month="June" year="2023"/>
            <abstract>
              <t>It is not uncommon for resource servers to require different authentication strengths or recentness according to the characteristics of a request.  This document introduces a mechanism that resource servers can use to signal to a client that the authentication event associated with the access token of the current request does not meet its authentication requirements and, further, how to meet them.  This document also codifies a mechanism for a client to request that an authorization server achieve a specific authentication strength or recentness when processing an authorization request.
              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-oauth-step-up-authn-challenge-17"/>
        </reference>
        <reference anchor="OpenID.Native-SSO" target="https://openid.net/specs/openid-connect-native-sso-1_0.html">
          <front>
            <title>OpenID Connect Native SSO for Mobile Apps</title>
            <author initials="G." surname="Fletcher">
              <organization/>
            </author>
            <date year="2022" month="November"/>
          </front>
        </reference>
        <reference anchor="OpenID" target="https://openid.net/specs/openid-connect-core-1_0.html">
          <front>
            <title>OpenID Connect Core 1.0</title>
            <author initials="N." surname="Sakimura">
              <organization/>
            </author>
            <author initials="J." surname="Bradley">
              <organization/>
            </author>
            <author initials="M." surname="Jones">
              <organization/>
            </author>
            <author initials="B." surname="de Medeiros">
              <organization/>
            </author>
            <author initials="C." surname="Mortimore">
              <organization/>
            </author>
            <date year="2014" month="November"/>
          </front>
        </reference>
        <reference anchor="IANA.OAuth.Parameters">
          <front>
            <title>*** BROKEN REFERENCE ***</title>
            <author>
              <organization/>
            </author>
            <date/>
          </front>
        </reference>
        <reference anchor="IANA.JWT">
          <front>
            <title>*** BROKEN REFERENCE ***</title>
            <author>
              <organization/>
            </author>
            <date/>
          </front>
        </reference>
        <reference anchor="USASCII">
          <front>
            <title>Coded Character Set -- 7-bit American Standard Code for Information Interchange, ANSI X3.4</title>
            <author initials="A. N. S." surname="Institute" fullname="American National Standards Institute">
              <organization/>
            </author>
            <date year="1986"/>
          </front>
        </reference>
        <reference anchor="SHS" target="http://dx.doi.org/10.6028/NIST.FIPS.180-4">
          <front>
            <title>"Secure Hash Standard (SHS)", FIPS PUB 180-4, DOI 10.6028/NIST.FIPS.180-4</title>
            <author initials="N. I. of S. and" surname="Technology" fullname="National Institute of Standards and Technology">
              <organization/>
            </author>
            <date year="2015" month="August"/>
          </front>
        </reference>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="RFC8252">
          <front>
            <title>OAuth 2.0 for Native Apps</title>
            <author fullname="W. Denniss" initials="W." surname="Denniss"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <date month="October" year="2017"/>
            <abstract>
              <t>OAuth 2.0 authorization requests from native apps should only be made through external user-agents, primarily the user's browser. This specification details the security and usability reasons why this is the case and how native apps and authorization servers can implement this best practice.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="212"/>
          <seriesInfo name="RFC" value="8252"/>
          <seriesInfo name="DOI" value="10.17487/RFC8252"/>
        </reference>
        <reference anchor="I-D.ietf-oauth-browser-based-apps">
          <front>
            <title>OAuth 2.0 for Browser-Based Apps</title>
            <author fullname="Aaron Parecki" initials="A." surname="Parecki">
              <organization>Okta</organization>
            </author>
            <author fullname="David Waite" initials="D." surname="Waite">
              <organization>Ping Identity</organization>
            </author>
            <date day="29" month="June" year="2023"/>
            <abstract>
              <t>   This specification details the security considerations and best
   practices that must be taken into account when developing browser-
   based applications that use OAuth 2.0.

Discussion Venues

   This note is to be removed before publishing as an RFC.

   Discussion of this document takes place on the Web Authorization
   Protocol Working Group mailing list (oauth@ietf.org), which is
   archived at https://mailarchive.ietf.org/arch/browse/oauth/.

   Source for this draft and an issue tracker can be found at
   https://github.com/oauth-wg/oauth-browser-based-apps.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-oauth-browser-based-apps-14"/>
        </reference>
      </references>
    </references>
    <?line 666?>

<section anchor="example-user-experiences">
      <name>Example User Experiences</name>
      <t>This section provides non-normative examples of how this specification may be used to support specific use cases.</t>
      <section anchor="passkey">
        <name>Passkey</name>
        <t>A user may log in with a passkey (without a password).</t>
        <ul spacing="normal">
          <li>
            <t>The Client collects the username from the user.</t>
          </li>
          <li>
            <t>The Client sends an Authorization Challenge Request (<xref target="challenge-request"/>) to the Authorization Challenge Endpoint (<xref target="authorization-challenge-endpoint"/>) including the username.</t>
          </li>
          <li>
            <t>The Authorization Server verifies the username and returns a challenge</t>
          </li>
          <li>
            <t>The Client signs the challenge using the platform authenticator, which results in the user being prompted for verification with biometrics or a PIN.</t>
          </li>
          <li>
            <t>The Client sends the signed challenge, username, and credential ID to the Authorization Challenge Endpoint (<xref target="authorization-challenge-endpoint"/>).</t>
          </li>
          <li>
            <t>The Authorization Server verifies the signed challenge and returns an Authorization Code.</t>
          </li>
          <li>
            <t>The Client requests an Access Token and Refresh Token by issuing a Token Request (<xref target="token-request"/>) to the Token Endpoint.</t>
          </li>
          <li>
            <t>The Authorization Server verifies the Authorization Code and issues the requested tokens.</t>
          </li>
        </ul>
      </section>
      <section anchor="redirect-to-authorization-server">
        <name>Redirect to Authorization Server</name>
        <t>A user may be redirected to the Authorization Server to perfrom an account reset.</t>
        <ul spacing="normal">
          <li>
            <t>The Client collects username from the user.</t>
          </li>
          <li>
            <t>The Client sends an Authorization Challenge Request (<xref target="challenge-request"/>) to the Authorization Challenge Endpoint (<xref target="authorization-challenge-endpoint"/>) including the username.</t>
          </li>
          <li>
            <t>The Authorization Server verifies the username and determines that the account is locked and returns a Redirect message.</t>
          </li>
          <li>
            <t>The Client parses the redirect message, opens a browser and redirects the user to the Authorization Server performing an OAuth 2.0 flow with PKCE.</t>
          </li>
          <li>
            <t>The user resets their account by performing a multi-step authentication flow with the Authorization Server.</t>
          </li>
          <li>
            <t>The Authorization Server issues an Authorizaton Code, which is exchanged for an access and refresh token before returning control to the Client.</t>
          </li>
        </ul>
      </section>
      <section anchor="passwordless-one-time-passwork-otp">
        <name>Passwordless One-Time Passwork (OTP)</name>
        <t>In a passwordless One-Time Password (OTP) scheme, the user is in possession of a one-time password generator. This generator may be a hardware device, or implemented as an app on a mobile phone. The user provides a user identifier and one-time password, which is verified by the Authorization Server before it issues an Authorization Code, which can be exchanged for an Access and Refresh Token.</t>
        <ul spacing="normal">
          <li>
            <t>The Client collects username and OTP from user.</t>
          </li>
          <li>
            <t>The Client sends an Authorization Challenge Request (<xref target="challenge-request"/>) to the Authorization Challenge Endpoint (<xref target="authorization-challenge-endpoint"/>) including the username and OTP.</t>
          </li>
          <li>
            <t>The Authorization Server verifies the username and OTP and returns an Authorization Code.</t>
          </li>
          <li>
            <t>The Client requests an Access Token and Refresh Token by issuing a Token Request (<xref target="token-request"/>) to the Token Endpoint.</t>
          </li>
          <li>
            <t>The Authorization Server verifies the Authorization Code and issues the requested tokens.</t>
          </li>
        </ul>
      </section>
      <section anchor="e-mail-confirmation-code">
        <name>E-Mail Confirmation Code</name>
        <t>A user may be required to provide an e-mail confirmation code as part of an authentication ceremony to prove they control an e-mail address. The user provides an e-mail address and is then requried to enter a verification code sent to the e-mail address. If the correct verification code is returned to the Authorization Server, it issues Access and Refresh Tokens.</t>
        <ul spacing="normal">
          <li>
            <t>The Client collects an e-mail address from the user.</t>
          </li>
          <li>
            <t>The Client sends the e-mail address in an Authorization Challenge Request (<xref target="challenge-request"/>) to the Authorization Challenge Endpoint (<xref target="authorization-challenge-endpoint"/>).</t>
          </li>
          <li>
            <t>The Authorization Server sends a verification code to the e-mail address and returns an Error Response (<xref target="challenge-error-response"/>) including <tt>"error": "authorization_required"</tt>, <tt>"auth_session"</tt> and a custom error code indicating that an e-mail verification code must be entered.</t>
          </li>
          <li>
            <t>The Client presents a user experience guiding the user to copy the e-mail verification code to the Client. Once the e-mail verification code is entered, the Client sends an Authorization Challenge Request to the Authorization Challenge Endpoint, including the e-mail verification code as well as the <tt>auth_session</tt> parameter returned in the previous Error Response.</t>
          </li>
          <li>
            <t>The Authorization Server uses the <tt>auth_session</tt> to maintain the session and verifies the e-mail verification code before issuing an Authorization Code to the Client.</t>
          </li>
          <li>
            <t>The Client sends the Authorization Code in a Token Request (<xref target="token-request"/>) to the Token Endpoint.</t>
          </li>
          <li>
            <t>The Authorization Server verifies the Authorization Code and issues the Access Token and Refresh Token.</t>
          </li>
        </ul>
      </section>
      <section anchor="sms-confirmation-code">
        <name>SMS Confirmation Code</name>
        <t>A user may be required to provide an SMS confirmation code as part of an authentication ceremony to prove they control a mobile phone number. The user provides a phone number and is then requried to enter a SMS confirmation code sent to the phone. If the correct confirmation code is returned to the Authorization Server, it issues Access and Refresh Tokens.</t>
        <ul spacing="normal">
          <li>
            <t>The Client collects a mobile phone number from the user.</t>
          </li>
          <li>
            <t>The Client sends the phone number in an Authorization Challenge Request (<xref target="challenge-request"/>) to the Authorization Challenge Endpoint (<xref target="authorization-challenge-endpoint"/>).</t>
          </li>
          <li>
            <t>The Authorization Server sends a confirmation code to the phone number and returns an Error Response (<xref target="challenge-error-response"/>) including <tt>"error": "authorization_required"</tt>, <tt>"auth_session"</tt> and a custom error code indicating that a SMS confirmation code must be entered.</t>
          </li>
          <li>
            <t>The Client presents a user experience guiding the user to enter the SMS confirmation code. Once the SMS verification code is entered, the Client sends an Authorization Challenge Request to the Authorization Challenge Endpoint, including the confirmation code as well as the <tt>auth_session</tt> parameter returned in the previous Error Response.</t>
          </li>
          <li>
            <t>The Authorization Server uses the <tt>auth_session</tt> to maintain the session context and verifies the SMS code before issuing an Authorization Code to the Client.</t>
          </li>
          <li>
            <t>The Client sends the Authorization Code in a Token Request (<xref target="token-request"/>) to the Token Endpoint.</t>
          </li>
          <li>
            <t>The Authorization Server verifies the Authorization Code and issues the Access Token and Refresh Token.</t>
          </li>
        </ul>
      </section>
      <section anchor="re-authenticating-to-an-app-a-week-later-using-otp">
        <name>Re-authenticating to an app a week later using OTP</name>
        <t>A client may be in possession of an Access and Refresh Token as the result of a previous succesful user authentication. The user returns to the app a week later and accesses the app. The Client presents the Access Token, but receives an error indicating the Access Token is no longer valid. The Client presents a Refresh Token to the Authorization Server to obtain a new Access Token. If the Authorization Server requires user interaction for reasons based on its own policies, it rejects the Refresh Token and the Client re-starts the user authentication flow to obtain new Access and Refresh Tokens.</t>
        <ul spacing="normal">
          <li>
            <t>The Client has a short-lived access token and long-lived refresh token following a previous completion of an Authorization Grant Flow which included user authentication.</t>
          </li>
          <li>
            <t>A week later, the user launches the app and tries to access a protected resource at the Resource Server.</t>
          </li>
          <li>
            <t>The Resource Server responds with an error code indicating an invalid access token since it has expired.</t>
          </li>
          <li>
            <t>The Client presents the refresh token to the Authorization Server to obtain a new access token (section 6 <xref target="RFC6749"/>)</t>
          </li>
          <li>
            <t>The Authorization Server responds with an error code indicating that an OTP from the user is required, as well as a <tt>auth_session</tt>.</t>
          </li>
          <li>
            <t>The Client prompts the user to enter an OTP.</t>
          </li>
          <li>
            <t>The Client sends the OTP and <tt>auth_session</tt> in an Authorization Challenge Request (<xref target="challenge-request"/>) to the Authorization Challenge Endpoint (<xref target="authorization-challenge-endpoint"/>).</t>
          </li>
          <li>
            <t>The Authorization Server verifies the <tt>auth_session</tt> and OTP, and returns an Authorization Code.</t>
          </li>
          <li>
            <t>The Client sends the Authorization Code in a Token Request (<xref target="token-request"/>) to the Token Endpoint.</t>
          </li>
          <li>
            <t>The Authorization Server verifies the Authorization Code and issues the requested tokens.</t>
          </li>
          <li>
            <t>The Client presents the new Access Token to the Resource Server in order to access the protected resource.</t>
          </li>
        </ul>
      </section>
      <section anchor="step-up-authentication-using-confirmation-sms">
        <name>Step-up Authentication using Confirmation SMS</name>
        <t>A Client previously obtained an Access and Refresh Token after the user authenticated with an OTP. When the user attempts to access a protected resource, the Resource Server determines that it needs an additional level of authentication and triggers a step-up authentication, indicating the desired level of authentication using <tt>acr_values</tt> and <tt>max_age</tt> as defined in the Step-up Authentication specification. The Client initiates an authorization request with the Authorization Server indicating the <tt>acr_values</tt> and <tt>max_age</tt> parameters. The Authorization Server responds with error messages promptng for additional authentication until the <tt>acr_values</tt> and <tt>max_age</tt> values are satisfied before issuing fresh Access and Refresh Tokens.</t>
        <ul spacing="normal">
          <li>
            <t>The Client has a short-lived access token and long-lived refresh token following the completion of an Authorization Grant Flow which included user authentication.</t>
          </li>
          <li>
            <t>When the Client presents the Access token to the Resource Server, the Resource Server determines that the <tt>acr</tt> claim in the Access Token is insufficient given the resource the user wants to access and responds with an <tt>insufficient_user_authentication</tt> error code, along with the desired <tt>acr_values</tt> and desired <tt>max_age</tt>.</t>
          </li>
          <li>
            <t>The Client sends an Authorization Challenge Request (<xref target="challenge-request"/>) to the Authorization Challenge Endpoint (<xref target="authorization-challenge-endpoint"/>) including the <tt>auth_session</tt>, <tt>acr_values</tt> and <tt>max_age</tt> parameters.</t>
          </li>
          <li>
            <t>The Authorization Server verifies the <tt>auth_session</tt> and determines which authentication methods must be satisfied based on the <tt>acr_values</tt>, and responds with an Error Response (<xref target="challenge-error-response"/>) including <tt>"error": "authorization_required"</tt> and a custom error code indicating that an OTP must be entered.</t>
          </li>
          <li>
            <t>The Client prompts the user for an OTP, which the user obtains and enters.</t>
          </li>
          <li>
            <t>The Client sends an Authorization Challenge Request to the Authorization Challenge Endpoint including the <tt>auth_session</tt> and OTP.</t>
          </li>
          <li>
            <t>The Authorization Server verifies the OTP and returns an Authorization Code.</t>
          </li>
          <li>
            <t>The Client sends the Authorization Code in a Token Request (<xref target="token-request"/>) to the Token Endpoint.</t>
          </li>
          <li>
            <t>The Authorization Server verifies the Authorization Code and issues an Access Token with the updated <tt>acr</tt> value along with the Refresh Token.</t>
          </li>
          <li>
            <t>The Client presents the Access Token to the Resources Server, which verifies that the <tt>acr</tt> value meets its requirements before granting access to the prtoected resource.</t>
          </li>
        </ul>
      </section>
      <section anchor="registration">
        <name>Registration</name>
        <t>This example describes how to use the mechanisms defined in this draft to create a complete user registration flow starting with an email address. In this example, it is the Authorization Server's policy to allow these challenges to be sent to email and phone number that were previously unrecognized, and creating the user account on the fly.</t>
        <ul spacing="normal">
          <li>
            <t>The Client collects a username from the user.</t>
          </li>
          <li>
            <t>The Client sends an Authorization Challenge Request (<xref target="challenge-request"/>) to the Authorization Challenge Endpoint (<xref target="authorization-challenge-endpoint"/>) including the username.</t>
          </li>
          <li>
            <t>The Authorization Server returns an Error Response (<xref target="challenge-error-response"/>) including <tt>"error": "authorization_required"</tt>, <tt>"auth_session"</tt>, and a custom error code indicating that an e-mail address must be collected.</t>
          </li>
          <li>
            <t>The Client collects an e-mail address from the user.</t>
          </li>
          <li>
            <t>The Client sends the e-mail address as part of a second Authorization Challenge Request to the Authorization Challenge Endpoint, along with the <tt>auth_session</tt> parameter.</t>
          </li>
          <li>
            <t>The Authorization Server sends a verification code to the e-mail address and returns an Error Response including <tt>"error": "authorization_required"</tt>, <tt>"auth_session"</tt> and a custom error code indicating that an e-mail verification code must be entered.</t>
          </li>
          <li>
            <t>The Client presents a user experience guiding the user to copy the e-mail verification code to the Client. Once the e-mail verification code is entered, the Client sends an Authorization Challenge Request to the Authorization Challenge Endpoint, including the e-mail verification code as well as the <tt>auth_session</tt> parameter returned in the previous Error Response.</t>
          </li>
          <li>
            <t>The Authorization Server uses the <tt>auth_session</tt> to maintain the session context, and verifies the e-mail verification code. It determines that it also needs a phone number for account recovery purposes and returns an Error Response including <tt>"error": "authorization_required"</tt>, <tt>"auth_session"</tt> and a custom error code indicating that a phone number must be collected.</t>
          </li>
          <li>
            <t>The Client collects a mobile phone number from the user.</t>
          </li>
          <li>
            <t>The Client sends the phone number in an Authorization Challenge Request to the Authorization Challenge Endpoint, along with the <tt>auth_session</tt>.</t>
          </li>
          <li>
            <t>The Authorization Server uses the <tt>auth_session</tt> parameter to link the previous requests. It sends a confirmation code to the phone number and returns an Error Response including <tt>"error": "authorization_required"</tt>, <tt>"auth_session"</tt> and a custom error code indicating that a SMS confirmation code must be entered.</t>
          </li>
          <li>
            <t>The Client presents a user experience guiding the user to enter the SMS confirmation code. Once the SMS verification code is entered, the Client sends an Authorization Challenge Request to the Authorization Challenge Endpoint, including the confirmation code as well as the <tt>auth_session</tt> parameter returned in the previous Error Response.</t>
          </li>
          <li>
            <t>The Authorization Server uses the <tt>auth_session</tt> to maintain the session context, and verifies the SMS verification code before issuing an Authorization Code to the Client.</t>
          </li>
          <li>
            <t>The Client sends the Authorization Code in a Token Request (<xref target="token-request"/>) to the Token Endpoint.</t>
          </li>
          <li>
            <t>The Authorization Server verifies the Authorization Code and issues the requested tokens.</t>
          </li>
        </ul>
      </section>
    </section>
    <section anchor="example-implementations">
      <name>Example Implementations</name>
      <t>In order to successfully implement this specification, the Authorization Server will need to define its own specific requirements for what values clients are expected to send in the Authorization Challenge Request (<xref target="challenge-request"/>), as well as its own specific error codes in the Authorization Challenge Response (<xref target="challenge-response"/>).</t>
      <t>Below is an example of parameters required for a complete implementation that enables the user to log in with a username and OTP.</t>
      <section anchor="authorization-challenge-request-parameters">
        <name>Authorization Challenge Request Parameters</name>
        <t>In addition to the request parameters defined in <xref target="challenge-request"/>, the authorization server defines the additional parameters below.</t>
        <dl>
          <dt>"username":</dt>
          <dd>
            <t><bcp14>REQUIRED</bcp14> for the initial Authorization Challenge Request.</t>
          </dd>
          <dt>"otp":</dt>
          <dd>
            <t>The OTP collected from the user. <bcp14>REQUIRED</bcp14> when re-trying an Authorization Challenge Request in response to the <tt>otp_required</tt> error defined below.</t>
          </dd>
        </dl>
      </section>
      <section anchor="authorization-challenge-response-parameters">
        <name>Authorization Challenge Response Parameters</name>
        <t>In addition to the response parameters defined in <xref target="challenge-response"/>, the authorization server defines the additional value for the <tt>error</tt> response below.</t>
        <dl>
          <dt>"otp_required":</dt>
          <dd>
            <t>The client should collect an OTP from the user and send the OTP in
a second request to the Authorization Challenge Endpoint. The HTTP
response code to use with this error value is <tt>401 Unauthorized</tt>.</t>
          </dd>
        </dl>
      </section>
      <section anchor="example-sequence">
        <name>Example Sequence</name>
        <t>The client prompts the user to enter their username, and sends the username in an initial Authorization Challenge Request.</t>
        <artwork><![CDATA[
POST /authorize HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded

username=alice
&scope=photos
&client_id=bb16c14c73415
]]></artwork>
        <t>The Authorization Server sends an error response indicating that an OTP is required.</t>
        <artwork><![CDATA[
HTTP/1.1 401 Unauthorized
Content-Type: application/json
Cache-Control: no-store

{
  "error": "otp_required",
  "auth_session": "ce6772f5e07bc8361572f"
}
]]></artwork>
        <t>The client prompts the user for an OTP, and sends a new Authorization Challenge Request.</t>
        <artwork><![CDATA[
POST /authorize HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded

auth_session=ce6772f5e07bc8361572f
&otp=555121
]]></artwork>
        <t>The Authorization Server validates the <tt>auth_session</tt> to find the expected user, then validates the OTP for that user, and responds with an authorization code.</t>
        <artwork><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
  "authorization_code": "uY29tL2F1dGhlbnRpY"
}
]]></artwork>
        <t>The client sends the authorization code to the token endpoint.</t>
        <artwork><![CDATA[
POST /token HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded

grant_type=authorization_code
&client_id=bb16c14c73415
&code=uY29tL2F1dGhlbnRpY
]]></artwork>
        <t>The Authorization Server responds with an access token and refresh token.</t>
        <artwork><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
  "token_type": "Bearer",
  "expires_in": 3600,
  "access_token": "d41c0692f1187fd9b326c63d",
  "refresh_token": "e090366ac1c448b8aed84cbc07"
}
]]></artwork>
      </section>
    </section>
    <section anchor="design-goals">
      <name>Design Goals</name>
      <t>Rather than extend the OAuth token endpoint with additional grant types, this specification defines a new authorization flow the client can use to obtain an authorization flow. There are two primary reasons for designing the specification this way.</t>
      <t>This enables existing OAuth implementations to make fewer modifications to existing code by not needing to extend the token endpoint with new logic. Instead, the new logic can be encapsulated in entirely new endpoint, the output of which is an authorization code which can be redeemed for an access token at the existing token endpoint.</t>
      <t>This also mirrors more closely the existing architecture of the redirect-based authorization code flow. In the authorization code flow, the client first initiates a request by redirecting a browser to the authorization endpoint, at which point the authorization server takes over with its own custom logic to authenticate the user in whatever way appropriate. Afterwards, the authorization server redirects the user back to the client application with an authorization code in the query string. This specification mirrors the existing approach by having the client first make a POST request to the "authorization challenge endpoint", at which point the authorization server provides its own custom logic to authenticate the user, eventually returning an authorization code.</t>
      <t>These design decisions should enable authorization server implementations to isolate and encapsulate the changes needed to support this specification.</t>
    </section>
    <section anchor="document-history">
      <name>Document History</name>
      <t>-01</t>
      <ul spacing="normal">
        <li>
          <t>Renamed <tt>device_session</tt> to <tt>auth_session</tt></t>
        </li>
        <li>
          <t>Added explicit method to indicate the client should restart the flow in a browser</t>
        </li>
        <li>
          <t>Described how to use DPoP in conjunction with this spec</t>
        </li>
      </ul>
    </section>
    <section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>The authors would like to thank the attendees of the OAuth Security Workshop 2023 session in which this was discussed, as well as the following individuals who contributed ideas, feedback, and wording that shaped and formed the final specification:</t>
      <t>Brian Campbell, Dick Hardt, Dmitry Telegin, John Bradley, Justin Richer, Mike Jones, Orie Steele, Tobias Looker.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA+1963rb1pXofz4FjvJNK6UkLcryJTp1W1nyRU5sqaZ83JxO
PwsEt0REIMABQMmskz7LPMt5srNu+wZsUJKbZJKv9TfTUCSwL2uvve6XwWDQ
q9M6U3vRxvH+sp5FO8Pt6Lwoo+dpWdWDk7isV9H+YpGlSVynRV5t9OLJpFRX
5oXAw/AQPK0uinK1F1X1tNebFkkez2GWaRmf14NFXKrkMh0UMYwwOKe3F/j2
IIa3B9vbvWo5madVBTPWqwW8d/Ts9HkvX84nqtzrTWHwvV4Cq1F5taz2orpc
qh4s6X4PBo5haWOVLMu0Xm30rovy8qIslgv49r2aRLjmokz/TruJTsqiLpIi
2+hdqhU8Ot3rRYMohx+vVIRrwT+d9eGftOjelcqXsIgous3gUcS72HgPq0nz
i+gFvoTfz+M0g+9pzD+lqj4fFuUF/hCXyQx+mNX1otq7dw+fw69gXUP92D38
4t6kLK4rdY9GuIdvXqT1bDmBd+O4LPLF5b0wlPHRDABZ1c408sqQxximRcfL
925zjsNZPYfN92KCCkIWpoyi82WWMTLs42zRCQ9Cv8Gu4lzgtxcdX9Yxfa0Y
TLS6P8mkw6SY43E4471Q8L6KnmeqTmaqDIx4EC/SOs6i4xweS/M4T9I4c6e4
oCGG5zLEnxJ+ochVYL4TOAlVRl/HVaWyeZwHJnydJmVRFee1O8mC3hte6vf+
NNdP0SS9vCjnhIKIX2+fHzx8tPuVfHw0emA+Phg9sB/tt1+N9MeH9x/Kx8c7
5rXHu6Nd/fHR9iP5+NVoRz/71S7PdjQ4JFST061qtRgsFwP8Ix8kszjLVH5B
SzxeqPzocPiG1jwYj4/3aLdCWPjX6KDIc5XUET8VwVNEOl4XkzRTRDX4pRjg
DyipMbKAt9PpMFf1vWqhkkq+GCQ83IDv6qCqisHowzahHI1jkI7+DaI0Bzrx
YugjBxGS6E1xpZCwR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