This is a starting point for browser-based OpenID Connect flows such as the implicit and authorization code flows. This request authenticates the user and returns tokens along with an authorization grant to the client app as a part of the callback response.
Note: Requests to the
/authorizeendpoint should redirect the browser (user agent) to the endpoint. You can't use AJAX with this endpoint. Example responses are intentionally omitted, but include displaying a sign-in prompt, redirecting to the client app, or displaying an error.
You can include an optional parameter in the authentication request. This parameter increases the level of user assurance.
Note: You can also provide multiple space-delimited values. The authorization server chooses one and reflects the chosen value in any resulting tokens.
| Enum Value | Description |
|---|---|
| phr |
|
| phrh |
|
| urn:okta:loa:1fa:any | Any one factor. Allows one factor authentication with no requirements on which factor. |
| urn:okta:loa:1fa:pwd | Password only. Allows one factor authentication that requires the user's password. |
| urn:okta:loa:2fa:any | Any two factors. Allows two factor authentication with no requirements on which factors. |
| urn:okta:loa:2fa:any:ifpossible |
Obtained during either manual client registration or through the Dynamic Client Registration API. It identifies the client and must match the value preregistered in Okta.
A challenge for PKCE. The challenge is verified in the access token request.
Method used to derive the code challenge for PKCE
The display parameter to be passed to the external identity provider when performing social login
A space-delimited list of values indicating which authenticators to enroll in.
- If the
enroll_amr_valuesparameter is specified, then the value forpromptmust beenroll_authenticator. - The parameter value is space-delimited, for example,
pwd sms okta_verifyis a valid request parameter value. You are prompted in the order of the amr values provided.
An Okta extension to the OpenID specification. A space-delimited list of scopes to be provided to the external identity provider when performing social login. These scopes are used in addition to the scopes already configured for the identity provider.
A value that's returned in the ID token. It's used to mitigate replay attacks. The value is required for implicit and hybrid flows, but optional for auth code flows. See OIDC Specs.
If you don't specify the prompt parameter, the standard behavior occurs:
- If an Okta session already exists and meets the assurance requirements of the app, the user is silently authenticated. Otherwise, the user is prompted to authenticate.
- If scopes are requested that require consent and consent isn't yet given by the authenticated user, the user is prompted to give consent.
| Enum Value | Description |
|---|---|
| none | Don't prompt for authentication or consent. If an Okta session already exists, the user is silently authenticated. Otherwise, an error is returned. |
| login | Always prompt the user for authentication, regardless of whether they have an Okta session. |
| consent | Depending on the values set for consent_method in the app and consent for the scope, display the Okta consent dialog, even if the user has already given consent. User consent is available for custom authorization servers (requires the API Access Management feature and the User Consent feature enabled). |
| login consent | Can also be |
| enroll_authenticator | This indicates that the intent is to enroll the user with an authenticator. The following other parameters must be used together with this value for a valid request:
|
Any combination of code, token, and id_token. The combination determines the flow.
How the authorization response should be returned. If id_token or token is specified in the response_type, then query isn't allowed as a response mode. Defaults to fragment in implicit and hybrid flows.
The Referrer-Policy header is automatically included in the response when either the fragment or query parameter values are used. The header is set to Referrer-Policy: no-referrer.
| Enum Value | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| fragment | Parameters are encoded in the URL fragment added to the | ||||||||||||||||||
| query | Parameters are encoded in the query string added to the | ||||||||||||||||||
| form_post | Parameters are encoded as HTML form values ( | ||||||||||||||||||
| okta_post_message | Uses HTML5 Web Messaging, for example,
Use the
|
A JWT created by the client that enables requests to be passed as a single, self-contained parameter.
- You must sign the JWT using either the app's client secret or a private key whose public key is registered on the app's JWKSet.
- You can't encrypt the JWT.
Note: See Build a JWT for client authentication for information on how to build a JWT.
- Okta supports the HMAC, RSA and ECDSA signature algorithms. HMAC signatures require that the client have a
token_endpoint_auth_methodthat uses aclient_secret. RSA and ECDSA signatures require that the client registers a public key. - Okta recommends that you don't duplicate any request parameters in the JWT and the query URI. However, you can do so with
state,nonce,code_challenge, andcode_challenge_method. In those cases, the values in the JWT overrides the query URI values. - Okta validates the
requestparameter in the following ways:issis required and must be theclient_id.audis required and must be the same value as the authorization server issuer that mints the ID or access token. This value is published in the metadata for your authorization server.- JWT lifetime is evaluated using the
iatandexpclaims, if present. If the JWT is expired or not yet valid, Okta returns aninvalid_request_objecterror. Okta rejects JWTs that expire more than one hour in the future. - Okta rejects the JWT if the
jticlaim is present and it has already been processed.
A value that is returned with the token. The client app can use it to remember the state of its interaction with the end user at the time of the authentication call. It can contain alphanumeric, comma, period, underscore, and hyphen characters.
Okta requires the OAuth 2.0 state parameter on all requests to the /authorize endpoint to prevent cross-site request forgery (CSRF). The OAuth 2.0 specification requires that clients protect their redirect URIs against CSRF by sending a value in the authorize request that binds the request to the user-agent's authenticated state. Using the state parameter is also a countermeasure to several other known attacks as outlined in OAuth 2.0 Threat Model and Security Considerations.
curl -i -X GET \
'https://okta-subdomain.pixtulate.com/oauth2/v1/authorize?acr_values=phr&client_id=string&code_challenge=string&code_challenge_method=S256&display=string&enroll_amr_values=duo&idp_scope=string&idp=string&interclient_token=string&login_hint=string&max_age=0&nonce=string&prompt=consent&redirect_uri=string&response_type=code&response_mode=form_post&request_uri=string&request=string&scope=string&sessionToken=string&state=string'Too Many Requests
A unique identifier for this error. Okta Support can use this to help with troubleshooting.
{ "errorCode": "E0000047", "errorSummary": "You exceeded the maximum number of requests. Try again in a while.", "errorLink": "E0000047", "errorId": "sampleQPivGUj_ND5v78vbYWW", "errorCauses": [] }