Unable to return custom error message when calling signIn with redirect: false #10884
Labels
bug
Something isn't working
invalid reproduction
The issue did not have a detectable valid reproduction URL
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Environment
System:
OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
CPU: (4) x64 Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
Memory: 3.31 GB / 5.73 GB
Container: Yes
Shell: 5.8.1 - /usr/bin/zsh
Binaries:
Node: 20.12.2 - /usr/local/bin/node
npm: 10.5.0 - /usr/local/bin/npm
pnpm: 9.0.6 - /mnt/c/Users/enes/AppData/Roaming/npm/pnpm
npmPackages:
next: 14.2.3 => 14.2.3
next-auth: 5.0.0-beta.18 => 5.0.0-beta.18
react: ^18.2.0 => 18.2.0
Reproduction URL
N/A
Describe the issue
When calling
SignIn()
method, with the parameteredirect: false
, I am not able to return a custom error message.I have initially attempted to throw a custom error as specified in the documentation. However, I always receive and response with
error: CredentialsSignIn
.How to reproduce
Implement providers with custom credentials sign in. Call the SignIn method like so:
Throw custom exception inside authorize method:
Expected behavior
Expect to see custom error in sign in response, instead you get
error: CredentialsSignIn
.The text was updated successfully, but these errors were encountered: