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

fix(core): update Authenticator schema and types

Open ndom91 opened this issue 1 year ago • 4 comments

☕️ Reasoning

  • Loosen up authenticator.transports type to also accept null
    • Removes the need for each adapter to have an extra method to just coerce transports to undefined if they're missing
    • This then led to the following cleanup in the pre-existing webauthn implementations in unstorage and prisma adapters
  • Fix prisma adapter
    • Cleanup authenticator method implementations
    • Remove unnecessary transports coercion methods
    • Cleanup recommended db schemas in docs
  • Fix unstorage adapter
    • listAuthenticatorsByUserId wasn't fully implemented, this is fixed here
    • All other authenticator-realted methods are cleaned up as well
    • Cleanup authenticator method implementations
    • Clean up multiple types

🧢 Checklist

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

🎫 Affected issues

📌 Resources

ndom91 avatar May 09 '24 10:05 ndom91

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

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 10, 2024 1:52pm
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview May 10, 2024 1:52pm
proxy ⬜️ Ignored (Inspect) Visit Preview May 10, 2024 1:52pm

vercel[bot] avatar May 09 '24 10:05 vercel[bot]

Codecov Report

Attention: Patch coverage is 97.43590% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 37.51%. Comparing base (4bec046) to head (94285ab).

Files Patch % Lines
packages/core/src/types.ts 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10861      +/-   ##
==========================================
+ Coverage   37.48%   37.51%   +0.02%     
==========================================
  Files         173      173              
  Lines       27026    26983      -43     
  Branches     1174     1176       +2     
==========================================
- Hits        10131    10122       -9     
+ Misses      16895    16861      -34     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 09 '24 10:05 codecov[bot]

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher

View full report↗︎

socket-security[bot] avatar May 09 '24 18:05 socket-security[bot]

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

socket-security[bot] avatar May 09 '24 18:05 socket-security[bot]