Everything is working fine, when I click on login, I’m logged in, that’s great.
But If I reload the page, during not even one second, I can see the “log out” label changing to “log in” and “log out” again.
I managed to reproduce it but for me when reloading it was Log in and then my avatar as if I’m logged in. Let me reach out to the person responsible for that quickstart and gather their knowledge on that!
So the way it works is that when you hit refresh on the page, it kind of ‘resets’ the auth state. So we use checkSession to figure out if the user is actually supposed to be logged in or not. If they are, the state of the app changes to light up all of the stuff you’re supposed to see when you’re logged in.
The delay in doing that makes the UI “pop” a little bit. They’ll initially be logged out, but then as it goes through the auth cycle, it will log in automatically.
Now, you won’t be automatically logged in again after refreshing the page if you’re using an Auth0 app that uses the Google development keys, as checkSession doesn’t work in that scenario. It will however, if you log in using some other provider or a username/password.