isLoading remains false when the user is unauthenticated

I’m using Auth0 Vue SDK.
I can use “isLoading” like this.

const { isLoading } = auth0;

When the user reloads the page while logged in, “isLoading” is initially set to true.
After a while, it change to false.
I’m sure this behavior is correct because the document said “isLoading” will be false if the SDK has finished processing the PKCE flow.

However, if the user is unauthenticated, “isLoading” is initially set to false and remains false forever.

Is this the expected behavior, or is it a bug?

Hi @t.fukao,

Welcome to the Auth0 Community!

I tested it today and am seeing the same behavior.
This may be because once the loading process is complete if the user is not authenticated, isLoading should turn false. .

This means the SDK has completed checking the authentication state and confirmed that the user is not logged in.

I recommend checking the Console for any errors or warnings that may indicate issues with your Auth0 configuration or authentication logic.

This should be the expected behavior.

I would also check this article The Complete Guide to Vue.js User Authentication with Auth0 for more information.


Please let me know if this helps and if you have any follow-up questions.

Thanks,
Timotei

Thank you, @petre.timotei.
I’ve checked the Console, and there were no errors or warnings.

I’m a bit confused about your answer.

I understand that isLoading indicates the SDK is currently in the process of checking the user’s authentication.

So I believe isLoading is initially set to true while the SDK is verifying the user’s authentication status, regardless of whether the user is logged in or not, and then it becomes false.

Is my understanding incorrect?

If I understand your answer correctly, the way isLoading behaves is contingent upon the user’s login status.

I would be very grateful for a clear explanation.

I apologize in advance if there were any elementary misunderstandings.

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