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

Fix: Supporting Database Strategies with Credentials Provider

Open yuito-it opened this issue 3 months ago • 3 comments

Fix: Supporting Database Strategies with Credentials Provider

☕️ Reasoning

EN

When using the Credentials Provider with a database strategy, sessions were not being persisted and authentication did not work as expected. This change updates the logic to properly store sessions in the database.

(I'm a Japanese student so I can't speak English well... Sorry...)

JA

Credentials Providerでは、Databaseを使うように指定している際に、セッションが保存されず、動作しませんでした。
そのため、DBにセッションを保存するように変更しました。

🧢 Checklist

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

🎫 Affected issues

Resolves: #11088
Resolves: #10280

📌 Resources

yuito-it avatar Oct 16 '25 12:10 yuito-it

@yuito-it is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Oct 16 '25 12:10 vercel[bot]

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
auth-docs Ready Ready Preview Comment Oct 16, 2025 0:26am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
next-auth-docs Ignored Ignored Preview Oct 16, 2025 0:26am

vercel[bot] avatar Oct 16 '25 12:10 vercel[bot]

Broken Link Checker

1 broken links found. Links organised below by source page, or page where they were found.

1) /getting-started/migrate-to-better-auth

Target Link Link Text
/docs "documentation"

github-actions[bot] avatar Oct 16 '25 12:10 github-actions[bot]