CSRF token mismatch #1401
Unanswered
DerkBusser
asked this question in
Help
Replies: 1 comment
-
Just out of curiosity, any reason you don't use the built-in We handle most of the stuff for you, so you can just write something like: <button onClick={() => signIn("email", {email: "email@example.com"})}>
Sign in
</button> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have implemented the email provider and some basic login functionality. I have copied the default login page. What i notice is that upon first load the email sign in always reverts to http://localhost:3000/api/auth/signin?csrf=true not to the verification-request page.
When looking into the CSRF tokens, it seems like the initial token is overwritten in the second request and then persisted.
There is nearly no logging on this, but by using debuggable and going into the csrf-token-handler.js it seems like the (initial) token cannot be validated and is thus automatically redirected to http://localhost:3000/api/auth/signin?csrf=true.
What am i missing?
Beta Was this translation helpful? Give feedback.
All reactions