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: updateSession doesn't update #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tpetrina
Copy link

The bug manifests with an error about duplicate key. The fix is to search by sessionToken and then update expires. This is in line with the official implementation for the mongo provider (found here: https://github.com/nextauthjs/next-auth/blob/main/packages/adapter-mongodb/src/index.ts#L240).

Reasoning 💡

Checklist 🧢

  • Documentation
  • Tests
  • Ready to be merged

Affected issues 🎟

The bug manifests with an error about duplicate key. The fix is to search by `sessionToken` and then update `expires`. This is in line with the official implementation for the mongo provider (found here: https://github.com/nextauthjs/next-auth/blob/main/packages/adapter-mongodb/src/index.ts#L240).
@tpetrina
Copy link
Author

Just noticed the requirements for tests and documentation. Not sure if I need to document this part anywhere - it's just a bug fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant