I am working on a react application with Auth0 integration. I am trying to access an express-nodejs API from my react app. For this, I have registered my API under the API section in my Auth0 dashboard and assigned a list of scopes. My authentication flow is working fine and I am getting my ID token from getIdTokenClaims ( react-auth0-spa).
I have enabled Allow Skipping User Consent aswell for the API
*But while I try to get my access token for calling the API, I am getting the following error *** 1. error: “login_required” 2. error_description: “Login required” 3.state: ""
For my own API, I changed the localhost to 127.0.0.1:3900/api/customers
Called getTokenSilently() without params - this is returning an opaque token
Called get TokenSilently() with params from Microsoft edge - I am getting a similar error, instead of login required its consent required.
But one good thing that’s happening is I am able to get the JWT auth token for APIs provided by Auth0. I am not sure what I did differently, but it’s working now.
So the issue remains for my API alone at the moment.
When I check the Auth0 Dashboard > users; under the user, I am logging with only two Authorised applications are listed
– > https:///userinfo
---->https://api/v2/
Do I need to get my Customers API listed here for authentication to happen? , if yes how do I do it?
Dear @dan.woda
As per the thread attached, the user info API should return a token silently without user consent popup. This sounds like a solution as the user provides a consent first time he/she logs into the application.
But the following request is returning an opaque token, what am I doing wrong here?