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

fix: add CustomCredentials error class to extend from for custom authorize() error #10231

Conversation

ndom91
Copy link
Member

@ndom91 ndom91 commented Mar 6, 2024

☕️ Reasoning

  • Adds a new CustomCredentials error class that is designed to be extended for the custom authorize() error functionality we recently shipped.
  • The idea here is to avoid extending an already existing Error (like CredentialsSignin) because it includes overrides on the error.message, for example, which will add a suffix like \nVisit https://authjs.dev/errors/... for more info

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

📌 Resources

Copy link

vercel bot commented Mar 6, 2024

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

Name Status Preview Comments Updated (UTC)
auth-docs ❌ Failed (Inspect) May 14, 2024 10:03am
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview May 14, 2024 10:03am
nextra-docs ⬜️ Ignored (Inspect) Visit Preview May 14, 2024 10:03am
proxy ⬜️ Ignored (Inspect) Visit Preview May 14, 2024 10:03am

@MrOxMasTer
Copy link

If you create this class, don't forget to export it to next-auth immediately. Thanks

@ndom91 ndom91 marked this pull request as ready for review March 10, 2024 14:11
@ndom91 ndom91 requested a review from ThangHuuVu as a code owner March 10, 2024 14:11
@MrOxMasTer
Copy link

Can you upload a new version of the package to npm after combining pull request with main?

@ndom91
Copy link
Member Author

ndom91 commented May 31, 2024

Replaced by: #11050

@ndom91 ndom91 closed this May 31, 2024
@ndom91 ndom91 deleted the ndom91/use-custom-error-to-extend-for-new-authorize-custom-error branch September 15, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants