Hi @mayhew3 ,
This can sometimes happen if the audience
and/or scope
is not included in the AuthModule.forRoot()
or if you are requesting an access token for a different audience at a later point. Could this be the case for your app?
Also, are you using cacheLocation: "localstorage"
?
Question: Why is authentication lost after refreshing my SPA?
Answer:
There could be a few different reasons why authentication is lost after refreshing a single page application. Common reasons are 1) Auth0 developer keys are being used instead of your own credentials for a social connection or 2) the browser is blocking third-party cookies.
1) Social connection settings
To figure out which problem you might be facing, you can check to see if authentication is lost for database connections …
Hi @onpaws ,
Thanks for trying out the new feature! In that default configuration with refresh tokens turned on, you will be storing the refresh token in memory. So when you come to the app fresh or refresh the page, you won’t have a refresh token.
In any event that you don’t have a refresh token, the SDK falls back to the legacy iframe method to try and get you an access token and a refresh token based on your existing session. This unfortunately has all the pitfalls of requiring 3rd-party coo…