Closed hussainabeer closed 2 months ago
Also some additional context: This endpoint is only if the user is not authenticated. if I sign up a user, (after which the authentication status is failing to set since fetch user request is failing) if I try to sign up again, that request is failing saying that the user is already authenticated.
Hope this helps
My bad.... I defined the origin wrong on prod 😅 apologies.
Describe the bug In production, somehow when SSR turned on, the user fetch seems to be failing with a 401 response. Weird part is this only happens in the production env and not dev.
To Reproduce Steps to reproduce the behavior:
Expected behavior When user is authenticated, it should get the current user and set the authentication status
Screenshots
Module information
sanctum
from yournuxt.config.ts
Nuxt environment:
Laravel environment:
config/session.php
: [.wdm.mv
]config/sanctum.php
config/cors.php
Additional context I have censored some of the details since its a project for a client. Any help regarding this issue is highly appreciated.