Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return always status code 401 in case of any error when using Credentials Provider #4601

Merged
merged 2 commits into from Jun 9, 2022

Conversation

TomFreudenberg
Copy link
Contributor

@TomFreudenberg TomFreudenberg commented May 22, 2022

☕️ Reasoning

When throwing errors while authorize Credentials, the Status from return should be 401 in any case.

It is unusual to check result for errors but when Status is 200 and OK === true.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Fixes: #3966
Fixes: #1564

But without changing other than the Status code.

@vercel
Copy link

vercel bot commented May 22, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
next-auth ✅ Ready (Inspect) Visit Preview Jun 8, 2022 at 11:20AM (UTC)

@github-actions github-actions bot added the core Refers to `@auth/core` label May 22, 2022
@TomFreudenberg
Copy link
Contributor Author

Hey at maintainers ;-)

Is there anything I can do to proceed on this PR?

Thanks for any feedback

Copy link
Collaborator

@ubbe-xyz ubbe-xyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 💚

@ubbe-xyz
Copy link
Collaborator

ubbe-xyz commented Jun 8, 2022

@TomFreudenberg can you update your branch to sync with main?

@ubbe-xyz ubbe-xyz self-assigned this Jun 8, 2022
@TomFreudenberg
Copy link
Contributor Author

Hi @lluia Done ;-)

@vercel vercel bot temporarily deployed to Preview June 8, 2022 11:20 Inactive
@ubbe-xyz ubbe-xyz merged commit 4daa63d into nextauthjs:main Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Refers to `@auth/core`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom SignIn errors without redirection
2 participants