After getting a 200 response from /login endpoint, it should update the state accordingly, hit the /user endpoint and redirect to home.
What is actually happening?
It works as expected when running npm run dev and npm run generate && npm run start. But when I deploy the dist folder to a different server, isLoggedIn state is always false in vuex even after getting a 200 response from /login from server. /user is never hit. Tested locally in Laragon, in a Linux Apache server and Netlify
Steps to reproduce
Setup a basic nuxt app with auth-next and use Laravel sanctum as the provider
Additional information
I have tried with ssr false as well, same issue.
Checklist
[ ✔] I have tested with the latest Nuxt version and the issue still occurs
[ ✔] I have tested with the latest module version and the issue still occurs
[ ✔] I have searched the issue tracker and this issue hasn't been reported yet
Version
module: nuxt:
Nuxt configuration
mode:
Nuxt configuration
What is expected?
After getting a 200 response from
/login
endpoint, it should update the state accordingly, hit the/user
endpoint and redirect to home.What is actually happening?
It works as expected when running
npm run dev
andnpm run generate && npm run start
. But when I deploy the dist folder to a different server, isLoggedIn state is always false in vuex even after getting a 200 response from/login
from server./user
is never hit. Tested locally in Laragon, in a Linux Apache server and NetlifySteps to reproduce
Setup a basic nuxt app with auth-next and use Laravel sanctum as the provider
Additional information
I have tried with ssr false as well, same issue.
Checklist
Code: https://github.com/sarik-k/laravel-nuxt-boilerplate/tree/master/client Loom: https://www.loom.com/share/4f2c5b4ec5294dadb522b2da7e128789