next-auth icon indicating copy to clipboard operation
next-auth copied to clipboard

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

Open ndom91 opened this issue 1 year ago • 3 comments

☕️ Reasoning

  • Just an idea, but open to discussion..
  • 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 the custom suffixes we append to error.message with the CredentialsSignin error class which we're currently recommending people extend from.
    • See: https://github.com/nextauthjs/next-auth/pull/9871#issuecomment-1979842947

🧢 Checklist

  • [ ] Documentation
  • [ ] Tests
  • [ ] Ready to be merged

🎫 Affected issues

📌 Resources

ndom91 avatar Mar 06 '24 15:03 ndom91

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

vercel[bot] avatar Mar 06 '24 15:03 vercel[bot]

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

MrOxMasTer avatar Mar 10 '24 08:03 MrOxMasTer

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

MrOxMasTer avatar Mar 21 '24 15:03 MrOxMasTer

Replaced by: https://github.com/nextauthjs/next-auth/pull/11050

ndom91 avatar May 31 '24 10:05 ndom91