Auth0 login (small) issue with VueJS

Hey there,

I’m new with Javascript, VueJS and Auth0 so sorry if my question is obvious!

Things I did:
-Downloaded files from VueJS tutorial 01-login

  • npm i && npm run serve.

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.

Is it normal ?

Hey there @l.sciampagna!

I have no VueJS knowledge but let me reproduce it and see whether it also behaves for me that way! I’ll get back to you soon!

Hey there @l.sciampagna!

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!

Got the newest info from the front!

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.

1 Like


Thank you for your research!
Ok it’s clear for me now.

Have a great day!

1 Like

Glad i was able to help!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.