You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That could be solvable easily, but the bigger issue is that the credentials POST response has status code 200, so the browser also thinks the response was a success.
Environment
System:
OS: macOS 13.0.1
CPU: (10) arm64 Apple M1 Pro
Memory: 101.13 MB / 32.00 GB
Shell: 3.5.1 - /opt/homebrew/bin/fish
Binaries:
Node: 16.18.1 - ~/.local/share/nvm/v16.18.1/bin/node
npm: 9.2.0 - ~/.local/share/nvm/v16.18.1/bin/npm
Browsers:
Chrome: 108.0.5359.98
Firefox: 107.0.1
Safari: 16.1
Safari Technology Preview: 16.4
npmPackages:
next: ^13.0.6 => 13.0.6
next-auth: ^4.18.6 => 4.18.6
react: ^18.2.0 => 18.2.0
Reproduction URL
https://codesandbox.io/s/beautiful-heisenberg-myfm11?file=/pages/auth/signin.tsx
Describe the issue
signIn
method with{ redirect: false }
and invalid credentials produces an invalid response:According to docs (https://next-auth.js.org/getting-started/client#using-the-redirect-false-option), response should be
This seems to break with 4.18.1 version, 4.18.0 is fine.
How to reproduce
const response = await signIn('cred_test', { username: 'invalid', password: 'invalid', redirect: false, callbackUrl: '/})
{error: "CredentialsSignin", status: 200, ok: true, url: null}
Expected behavior
Response should include
{error: "CredentialsSignin", status: 401, ok: false, url: null}
The text was updated successfully, but these errors were encountered: