provider Idp POST
/v1/idp/oauth/authorize/start @utdk/stytch
/v1/idp/oauth/authorize/start Authorizestart
Initiates a request for authorization of a Connected App to access a User's account.
Call this endpoint using the query parameters from an OAuth Authorization request.
This endpoint validates various fields (`scope`, `client_id`, `redirect_uri`, `prompt`, etc...) are correct and returns
relevant information for rendering an OAuth Consent Screen.
This endpoint returns:
- A public representation of the Connected App requesting authorization
- Whether _explicit_ user consent must be granted before proceeding with the authorization
- A list of scopes the user has the ability to grant the Connected App
Use this response to prompt the user for consent (if necessary) before calling the [Submit OAuth Authorization](https://stytch.com/docs/api/connected-apps-oauth-authorize) endpoint.
Exactly one of the following must be provided to identify the user granting authorization:
- `user_id`
- `session_token`
- `session_jwt`
If a `session_token` or `session_jwt` is passed, the OAuth Authorization will be linked to the user's session for tracking purposes.
One of these fields must be used if the Connected App intends to complete the [Exchange Access Token](https://stytch.com/docs/api/connected-app-access-token-exchange) flow.
Try it
Authentication
Configure credentials for Stytch API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.
Saved automatically to browser storage.
Code snippet
Updates live as you fill in the form above.
TypeScript
import stytch from '@utdk/stytch';
await stytch.apiIdpV1IdpOauthAuthorizestart()