Hello Jennifer Martinson,
This is a common issue when integrating Microsoft identity platform with Auth0 or other third-party identity providers using OAuth 2.0 Authorization Code Flow—especially in Single Page Applications (SPAs) like those built with MSAL React.
1. Ensure PKCE Is Enabled in Auth0
- In your Auth0 Application settings, make sure:
- Application Type is set to Single Page Application.
- Token Endpoint Authentication Method is set to None (since SPAs are public clients).
- Use PKCE is enabled (this is default for SPAs).
2. Use Authorization Code Flow with PKCE in MSAL React
- MSAL React (v2+) supports PKCE by default.
- Ensure you're using loginRedirect or loginPopup with the correct configuration.
3. Redirect URI Consistency
- Make sure the redirect URI used in:
- Your Auth0 configuration
- Your Azure App Registration
- Your MSAL config
...are exactly the same (including trailing slashes).
If I have answered your question, please accept this as answer as a token of appreciation and don't forget to thumbs up for "Was it helpful"!
Best regards,