Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My auth state goes to null on page refresh! What could be the issue? #891

Closed
yiyasha15 opened this issue Nov 26, 2020 · 5 comments
Closed

Comments

@yiyasha15
Copy link

No description provided.

@dvlden
Copy link

dvlden commented Nov 30, 2020

same here... using laravel-sanctum provider.

@TobiasJ
Copy link

TobiasJ commented Dec 4, 2020

Seems to be all related to #809 (comment)

Downgrade your @nuxt/axios version to the recommended and it should be working as intended. Long story short, auth module is not able to set the correct auth headers when requesting the user endpoint on server-side rendering, thus getting a 401 and no user data.

@bmulholland
Copy link
Contributor

It would be super helpful if one of you could either trace the bug to its source, or post a working codesandbox repro.

@msonowal
Copy link
Collaborator

@yiyasha15
This should be fixed in latest versions
nuxt-community/axios-module#452
also update your auth module to latest

and please close this

@JoaoPedroAS51
Copy link
Collaborator

Closing here since latest version of auth-next should solve this issue. @nuxtjs/axios updated to v5.12.4. Feel free to reopen if issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants