next-auth
next-auth copied to clipboard
fix: add `CustomCredentials` error class to extend from for custom `authorize()` error
☕️ Reasoning
- Just an idea, but open to discussion..
- Adds a new
CustomCredentialserror 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.messagewith theCredentialsSigninerror 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
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 |
If you create this class, don't forget to export it to next-auth immediately. Thanks
Can you upload a new version of the package to npm after combining pull request with main?
Replaced by: https://github.com/nextauthjs/next-auth/pull/11050