-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Session Cookie with knex.js #595
Comments
If the The Note: We also maintain SQL schemas (e.g. MySQL schema, Postgres schema) for the current version.
NextAuth.js ships with adapters that use TypeORM and Prisma and supports MySQL, Postgres, Microsoft SQL Server, MongoDB (and other databases compatible with them). To use another database or ORM you can create a custom adapter. You can also pass a database connection string to NextAuth.js and let it handle it's own connection without worrying about it, and connect to the database from your own application using whatever method you want.
Not currently. I expect this will be something we will add to the default database adapter fairly soon. |
thanks for response Iain, I will try it out! |
Hi there! It looks like this issue hasn't had any activity for a while. It will be closed if no further activity occurs. If you think your issue is still relevant, feel free to comment on it to keep ot open. Thanks! |
Hi there! It looks like this issue hasn't had any activity for a while. To keep things tidy, I am going to close this issue for now. If you think your issue is still relevant, just leave a comment and I will reopen it. (Read more at #912) Thanks! |
I am trying to switch to Next.js and before that I used Express.
For authentication I used express-session and connect-session-knex.
The great thing about connect-session-knex is that it creates the data table for you and if something changes or if you delete that table, it just creates a fresh one for you.
Furthermore it automatically deletes sessions from the database if they are not valid anymore, so you can set the time how many times the database should be checked for dead sessions.
In my case these modules check the database every 60 minutes and deletes sessions to keep the table small and fast as possible.
I would like to know if you have these features also in next-auth?
Will the required data table be created automatically and also updated if needed? (for example if a new version is there)
can you also use knex.js? (if yes an example would be nice)
does it also check the database and clean dead sessions if it find any?
Would be great if someone could help me with that :)
The text was updated successfully, but these errors were encountered: