Auth0-react getting "ID token is required but missing" with example app and own code

Hi Community,
In the past I used Auth0 Lock for doing the authentication in my React App.
Now I want to switch to the auth0-react sdk and created a new dummy Application in the Auth0 UI. After that, I followed “The Complete Guide to React User Authentication with Auth0” to get the auth0-react code running inside my existing app. After getting redirected to the Auth0 Login Screen and entering my Login Credentials, I get redirected back to my app to the expected redirectURI. But then I unfortunately get the error from auth0-react “ID token is required but missing”. After trying a few thing like trying to add the “openid” to the scope, I decided to test the official example app implementation. After downloading the example code directly from the Auth0 website (including the auto configuration) I launched the example app and got the same error after redirecting back to the redirectURI.

Any idea why this happens?

There were two log messages on the Auth0 Website per login try:

  1. (Successful login / Username-Password-Authentication)
  2. (Success Exchange / Authorization Code for Access Token)
  • Which SDK this is regarding: e.g. auth0-react
  • SDK Version: 1.2.0
  • Platform Version: React 16.13.1

The reason for this error was caused by a “rule” that I didn’t touch for a wile and also works with auth0 lock without any problem. After deactivating this rule and switching to “Actions” the example app and my own implementation works fine.

1 Like

Perfect! Glad to hear that and thanks for sharing with the rest of community!