-
Notifications
You must be signed in to change notification settings - Fork 5
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
[FEATURE] Store sessions in Redis #17
Comments
Anyway we could support this? |
How would it work?. Store sessions on redis for fast server side session validation, but, choosing another database and adapter to work with the actual data. An example could be |
Hi! I don't develop features for this project anymore, but if you'd like to try this I am happy to help you along the way. It's been a while since I wrote/read this code, but I think you'd need to write a custom adapter for next-auth which will know how to associate session data with user id's from e.g. Postgres; and know when to talk to Redis vs when to Postgres. I think it's more complicated with next-auth than it would be without tbh, since when implementing those functions like |
What about using my custom backend that already has everything set up? Pretty much I will just be using next auth to store server side sessions on the client (cookies). Does that seems feasible? |
Currently sessions are stored in Postgres despite having a Redis instance available.
lets-watch-it-together/src/pages/api/auth/[...nextauth].ts
Line 143 in 5fdc81f
Related:
nextauthjs/next-auth#544
The text was updated successfully, but these errors were encountered: