-
Notifications
You must be signed in to change notification settings - Fork 926
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
Dev - SSR - Sanctum - Browser hard refresh redirect to login #1244
Comments
facing a similar issue, any luck |
I have the same problem |
Same problem - is there already a solution? |
Same problem. |
I solved the problem. By checking header on laravel income requests I found those that were sent by server (in SSR mode) had wrong referer header. For me was ip address I use domian
|
this is not working |
See #1197 for SSR issues |
Version
module: 5.0.0-1624817847.21691f1
nuxt: 2.15.7
Nuxt configuration
mode:
Nuxt configuration
Reproduction
What is expected?
What is actually happening?
Additional information
First login
Login seems fine
✅ GET - 204 - /sanctum/csrf-cookie
✅ POST - 201 - /api/v1/auth/login - Response with the token
{"token":"1|011qtLINVWL4RfoLkrYwG9GHGEW6gL20MwcMmfcX"}
✅ GET - 200 - /api/v1/auth/user - Response with the user
{"id":1,"given_name":"Admin"}
✅ Redirect to the dashboard (home: '/')
Browser refresh (F5)
✅ GET - 200 - /api/v1/auth/user - Response with the user
{"id":1,"given_name":"Admin"}
🐛 Stay on /login
login.vue
I can bypass the problem by performing the following method in created(), but that's ugly. And it doesn't keep the browsing history.
Checklist
Laravel
routes/api.php
AuthController
The text was updated successfully, but these errors were encountered: