Auth0-angular login lost every time browser is reloaded

I used the Quick start at https://auth0.com/docs/quickstart/spa/angular to get up and running. At first glance it appears to work(isAuthenticated$ returns true and I am able to access data in user$) but when I reload the page, isAuthenticated$ returns false. Is there something I am missing? It seems the documentation has been changed recently for Auth0 with Angular. Hopefully there is something I am missing? Thanks for your help in advance!

The Angular quickstart uses the Auth0 SPA SDK which by default stores tokens in memory and as such has no persistence across page refreshes so it may be relevant to what you describe (https://auth0.com/docs/tokens/token-storage#browser-in-memory-scenarios).

The SDK allows for storage to be configurable (https://auth0.com/docs/libraries/auth0-single-page-app-sdk#change-storage-options).

1 Like