I’m using “@auth0 /auth0-angular” with my Ionic Angular app and I’ve already follow the instructions of auth0 dashboard configuration from this post.
and got the refresh toke in the response of POST /oauth/token
endpoint. But after the token is expired, I got 401 Unauthorized
error from my api. Not sure why the new access token hasn’t been generated?
Also, not sure if the refreshing/generating token process should make a request that we are able to see in the network inspection tab?
Because after I logged in and the token expired, there’s no any request to Auth0 to refresh/generate the token.
tyf
April 12, 2024, 10:17pm
4
Hey there @wnimlaor !
Thanks for the detailed description of the issue - Can you take a look at the following post and confirm your experience either way?
Hey there @emrose11 welcome to the community!
There are 3 things you need to do to enable your Angular app to use refresh tokens:
Be sure the registered API for which you are passing the identifier as the audience param has “Allow Offline Access” enabled in the API’s settings in your dashboard. In the sample application you set the audience param in auth_config.json .
Turn on refresh token rotation for the relevant SPA application in your dashboard.
Set useRefreshTokens: true in your A…
Hi @tyf , I’ve already implemented all the 3 steps at the first place.
tyf
Closed
May 8, 2024, 9:42pm
6
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.