@vincent15000 we can't help without any piece of code
Jul 15, 2022
4
Level 63
Laravel / Sanctum / VueJS / Axios / ERROR 401
Hello,
The authentication works fine, but when I try to retrieve some data, I get a 401 error (unauthenticated).
I have checked the request headers and the tokens are sent.
I don't see what I could check to solve this issue.
Thanks for your help ;).
Vincent
Level 63
@boyjarv I just solved the problem.
For me the front and the back are on the same domain, but on different subdomains.
In this case, the SESSION_DOMAIN has to be defined with a dot (as if there were a wildcard).
SESSION_DOMAIN=.mydomain.com
Please or to participate in this conversation.