Norbertho / vue-spa-laravel

28 stars 25 forks source link

GET http://localhost:8000/api/user [HTTP/1.1 401 Unauthorized ] #1

Open SandrinePENDA opened 4 years ago

SandrinePENDA commented 4 years ago

Hello, Thank you very much for your tutorials on SPA Laravel Authentication.

I followed all steps of your video https://www.youtube.com/watch?v=CwXhQZvuHjM and I don't know why, when I am logged in, the data user is empty and in the console, I get the error 401 Unauthorized. So I cannot access to the name nor email of the user. Please, need help. Thanks.

I apologize for my bad english.

n4j1Br4ch1D commented 3 years ago

in .env set: SANCTUM_STATEFUL_DOMAIN to your sub domain/SPA IP with the port e.g localhost:8000