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(adapter) - fix cookie expiration in Fauna getSession #1134

Closed
wants to merge 2 commits into from

Conversation

pbteja1998
Copy link

Fixes #1131

What:
session.data.expires that we get from Fauna DB is in Fauna.Time format. In this PR, I am converting it into milliseconds.

Why:
Session not being persisted when browser is closed because of invalid expiresAt date

Checklist:

  • [N/A] Documentation
  • [N/A] Tests
  • Ready to be merged

@vercel
Copy link

vercel bot commented Jan 17, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nextauthjs/next-auth/ailghk2a0
✅ Preview: https://next-auth-git-fork-pbteja1998-fauna-adapter-fix.nextauthjs.vercel.app

@vercel vercel bot temporarily deployed to Preview January 17, 2021 00:35 Inactive
@github-actions github-actions bot added the adapters Changes related to the core code concerning database adapters label Jan 17, 2021
@balazsorban44 balazsorban44 changed the title Fauna adapter - Fixes in getSession fix(adapter) - fix cookie expiration in Fauna getSession Jan 17, 2021
@balazsorban44 balazsorban44 requested a review from ndom91 January 17, 2021 08:16
Copy link
Member

@balazsorban44 balazsorban44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there are linting errors, could you fix those at least so builds don't fail? :) @pbteja1998

@vercel vercel bot temporarily deployed to Preview January 17, 2021 23:26 Inactive
@vercel vercel bot temporarily deployed to Preview January 17, 2021 23:27 Inactive
@balazsorban44
Copy link
Member

So sorry for this @pbteja1998, but we decided to drop builtin support for Fauna DB for now. it will be removed soon in a later release. it is a bit of an overhead to make sure it works, while there aren't even tests for it. As you did as well so good, it is still possible to use it with the custom adapter option. 😉

@pbteja1998
Copy link
Author

So sorry for this @pbteja1998, but we decided to drop builtin support for Fauna DB for now. it will be removed soon in a later release. it is a bit of an overhead to make sure it works, while there aren't even tests for it. As you did as well so good, it is still possible to use it with the custom adapter option. 😉

Not a problem. It works for my use-case. So it's OK.

@pbteja1998 pbteja1998 deleted the fauna-adapter-fix branch January 18, 2021 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters Changes related to the core code concerning database adapters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Session not being persisted when I close the browser
3 participants