Next.js Discord

Discord Forum

Calling server action from client side after login doesn't have cookies values

Unanswered
Brown bear posted this in #help-forum
Open in Discord
Brown bearOP
Hi I am on nextjs 14.2.12, I have a page which submits a server action, the server action checks if there is no authentication it return to login
in login page when the request is submitted it sends a request to a route handler for login and it also stores the token in cookie, after the request is finished I am calling automatically the server action from the previous step but the token is still not available in the cookie for some reason, why is that, I am only submitting the action after login request is finished
await login()
serverAction()

0 Replies