Next.js Discord

Discord Forum

use callback URL with redirect: false | nextAuth

Unanswered
Naeemgg posted this in #help-forum
Open in Discord
I'm using the signIn and signOut functions like below:
signIn("credentials", { callbackUrl:`/user/ac`, email: data.email, password: data.password });

signOut({callbackUrl:"/"})

I also want to use redirect:false in signIn but unable to use it and as of now when either thing email or password goes wrong I'm being redirected to nextauth error page which I dont want to happen

2 Replies

I want to show the error messages on the same page
because its credentialsProviders it doesn't make any sense to redirect users to errorPage then again user needs to come back to retry