Hello, i have got issue everytime when i refresh the page my token is also refreshing and so i cant checked whether our token is expired or no
Hi @agsarg Welcome to Auth0 community.
If you are using our angular quickstart then that’s how it is supposed to work. Can you clarify what is the problem you are having? When are you checking for token expiry?
I don’t want to get new token every time when i refresh, how can i fix this issue?
Thank You Dear Ashish
Hard to understand why you want to do that because it means that if user refreshes the page they need to login again.
Anyways if you still want to do that you should disable call to localAuthSetup in AuthenticationService. From Auth0 Angular QuickStart
The
localAuthSetup()
method uses theauth0-spa-js
SDK to check if the user is still logged in with the authorization server. If they are, their authentication state is restored in the front end when they return to the app after refreshing or leaving, without having to log in again. We can call this method from theconstructor
since our authentication service is a singleton.