Basic Promise fulfill/reject callback of signIn doesn't work #5425
Unanswered
rikusen0335
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Those basic callback handler, which means almost same code, of Promise fulfill/reject doesn't work.
So I google and read the doc that talking about how to handle the error on the same page,
butconst state = await signIn("discord")
is showing that state isSignInResponse
which has{ ok: boolean, error: string, ... }
etc.I just wanna know how it works(?) and what's wrong with my codes.
Any information or replies are really appreciated.
Edited:
Okay so my next-auth was really old and I upgraded it. Found v4.6.0 upgrades signIn return types to
Promise<SignInResponse | undefined>
with"email" | "credentials"
, eitherPromise<undefined>
.But I thought it is
Promise<>
so still fulfill/reject should work as I expected?Beta Was this translation helpful? Give feedback.
All reactions