laravelSanctum does not redirect after expired cookie #1503
Unanswered
rzb
asked this question in
Support Requests
Replies: 2 comments
-
I had the same problem. Fixed it using this in
|
Beta Was this translation helpful? Give feedback.
0 replies
-
In my case the user logs out automatically if the nuxt-auth cookie is expired, but when he try to login and the if laravel cookie has not expired, then it will give you an error. So I have written a simple function to logout and then try again.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Version
module: 5.0.0-1622918202.e815752
nuxt: 2.13.0
Nuxt configuration
[mode]
Nuxt configuration
Steps to reproduce
What is expected?
Ideally, the User should be logged out and redirected to login page right after cookie expiration, without waiting for him to click around. But redirecting on 401 is at least better than error page.
What is actually happening?
Nuxt 401 error page.
Additional comments
It's mentioned in issue #424 that Auth v5 has this fixed, so either the fix only works for token based auth or my config is messed up.
Beta Was this translation helpful? Give feedback.
All reactions