$auth.loggedIn state working as expected on local but misbehaving on production #1619
Replies: 5 comments
-
Have you got any solution? I have the same problem ? |
Beta Was this translation helpful? Give feedback.
-
Yeah, I did. But I can't say it's a permanent solution though.. What I did was check the state from the localStorage. Something like this
|
Beta Was this translation helpful? Give feedback.
-
@joshtom https://auth.nuxtjs.org/guide/middleware |
Beta Was this translation helpful? Give feedback.
-
i don't seem to get this. Can you please rephrase what you meant? |
Beta Was this translation helpful? Give feedback.
-
@joshtom your write custom axios setting ? my axios setting fixed. used now $auth.loggedIn |
Beta Was this translation helpful? Give feedback.
-
I have a simple flow
I have been able to connect all this page successfully with nuxt auth. But my main issue lies within the index page, where I am trying to conditionally render the avatar image once the user is logged in. However, It works perfectly on local, but didn't work on production.. During the process of debuggin I found out that, the
$auth.loggedIn
state is always false.Below is my code snippet
But the funny behaviour is, It was returning true on the dashboard where I'm getting user details and populating dynamically. Any help would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions