Pre-requisites
Before testing, follow one of the Getting Started or Integration guides to create your initial integration. You should have implemented an Authorization URL within your application that handles the OAuth Consent flow.The Authorization URL page requires the user to already be logged in to your app; redirect unauthenticated users to your login flow before rendering the consent screen
Test your Integration
Configure a Connected App client
Create a new Connected App client for use with the OAuth Debugger.
- Navigate to the Connected Apps page in the Dashboard and click
Add Application. - Follow the wizard to create a new
Third Party applicationusingPublicauthentication.- You can also create a
First Partyapplication, which may skip the consent screen. See the Consent Guide for details.
- You can also create a
- Name the client “OAuth Debugger” and add
https://oauthdebugger.com/debugas a Login Redirect URL. - Save your changes. You can leave the other fields as-is for now.
- Copy the
client_idfor use in the next step.
- Navigate to the
Settingstab. - Ensure there is a valid URL in the
Authorization URLinput.
Build the authorization request
Open the OAuth Debugger and fill in:
- Authorize URI: Your app’s Authorization URL (this is your page within your application). Example:
https://example.com/oauth/authorize. - Redirect URI:
https://oauthdebugger.com/debug. - Client ID: the Connected App’s
client_idfrom Step 1. - Scope: Start with
profile emailfor now. - State: Leave the default value for now.
- Nonce: Leave the default value for now.
- Response Type: Leave as
code. - Use PKCE?: Yes.
- Make sure
SHA-256is selected. - Use the default Code Verifier and Code Challenge.
- Make sure
- Token URI: Your project’s unique Token Endpoint (for B2B, for Consumer).
- Should be of the form
https://${projectDomain}/v1/oauth2/token. - You can find your Project Domain on the Project Overview page in the Dashboard.
- Should be of the form
- Response mode: Leave as
query.
code.Exchange the authorization code for tokens
The OAuth Debugger should automatically exchange the
code that was returned for a set of tokens. You should see an access_token JWT in the response. Copy the access token and paste it into a JWT decoder such as jwts.dev.You should be able to validate the following:- Scopes: The
scopeclaim in the access token should be what you initially requested. - Issuer: The
issclaim should be your unique Stytch project domain. - Audience: The
audclaim should be your unique Stytch project ID. - Subject: The
subclaim should be the ID of the Stytch member that granted access.
Other things to try
You can vary the parameters in the OAuth debugger to simulate different scenarios:
- ID Tokens: When the
openidscope is requested, anid_tokenwill be returned in the response. - Refresh Tokens: When the
offline_accessscope is requested, arefresh_tokenwill be returned in the response. - Custom and other built-in scopes: If your project defines any Custom Scopes, you may test them here as well.
Troubleshooting
- Redirect mismatch
Ensure the exact oauthdebugger redirecthttps://oauthdebugger.com/debug) is registered on the Connected App. Mismatches will fail validation. - Consent not shown
First-party clients may skip explicit consent depending on configuration; third-party clients always show consent. Refer to the Consent Guide for details on when consent is required. - PKCE errors
If the token exchange fails due to PKCE, confirm that thecode_verifiercorresponds to the originalcode_challengeS256).