#Next-Auth Credential signIn() Causing Issue with Code 302

9 messages · Page 1 of 1 (latest)

glad surge
#

https://stackoverflow.com/questions/74749898/next-auth-302-redirect-issue

n my onSubmit handler, the resp returned from signIn is: {error: null, status: 302, ok: false, url: 'http://localhost:3000/login'}

if (resp?.ok) fails and so router.push("/"); never gets called so the page doesn't redirect. But it does set the session token.

Where is this response coming from and why is that responder setting this 302 code that can't be handled? And ultimately, how can I correct this issue with the 302 status code that's causing the error?

full code: https://github.com/currenthandle/hackathon

#

Next-Auth Credential signIn() Causing Issue with Code 302

split pagoda
#

Hey I'm facing the same issue, did you find any solution?

small saffron
split pagoda
#

I just updated next auth lo latest version and everything is fixed

#

I'm getting status 200

small saffron
#

Yeah I too solved this issue somehow

#

They should be more explicit in the docs smh

split pagoda