Manually navigating to /api/auth/callback/resend
is not revalidating the page after successful verification
#12465
Unanswered
peguerosdc
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
-
Hi!
I am trying to implement authentication with OTP by adapting Resend's provider to send a token instead of an authentication link and asking the user to input that token in a form.
Once the token is input, I redirect the user to the verification page using a link exactly the same to the one that would have been sent by email by doing:
Once the user is directed to that page and passes the verification, he is automatically directed to the
callbackUrl
, but the problem is that user doesn't appear to be signed in. He has to manually refresh the website so the session is detected.Any ideas what is happening here? I am not sure if it's related to how Nextjs handles cache and navigation, or if it's related to Auth.js.
For reference, I am taking inspiration from this post on someone who did something similar, where the author proposed instead doing:
But I see the same behavior.
Beta Was this translation helpful? Give feedback.
All reactions