Implement RememberMe with NextAuth
Unanswered
Diamond Master posted this in #help-forum
I have setted up next-auth in my website, but idk how to implement the remember me function and not login the user after it has registered, how is it possible to do that? (i want a session that expires when the page / browser is closed if remember me is off)
2 Replies
@Diamond Master I have setted up next-auth in my website, but idk how to implement the remember me function and not login the user after it has registered, how is it possible to do that? (i want a session that expires when the page / browser is closed if remember me is off)
What you are describing isn't the same.
Remember me - Usually means pre-filling the username/email field
The other thing you are describing is session invalidation. I don't know how to don it with next-auth etc. But, essentially what you want is a session that ends after inactivity of a certain time, not a page closing. Or you provide a setting where people can state how long they want to stay logged in for. But remember me is a different feature.
Remember me - Usually means pre-filling the username/email field
The other thing you are describing is session invalidation. I don't know how to don it with next-auth etc. But, essentially what you want is a session that ends after inactivity of a certain time, not a page closing. Or you provide a setting where people can state how long they want to stay logged in for. But remember me is a different feature.
i found out how to do it, i'll just set the session time to like 1h or 2