Missing CSRF token on initial Update() call #11337
Unanswered
skullicious
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Scenario:
https://authjs.dev/reference/core/errors#missingcsrf
User logs in.
Soon after login a component mounts that takes data from the session to navigate away use this session data as a param
Part of this process includes the Update() function.
The initial login would throw this error on server side.
And on client side.
Subsequent navigations / signout / signins seem okay so it seems to be some kind of race condition maybe?
Adding a hardcoded timeout in the client component seems to support this. Has anyone else encountered this?
Is there any way I can wait or pass/access this cookie earlier?
Beta Was this translation helpful? Give feedback.
All reactions