Skip to content

How do I set maxAge on session (so that login is remembered after browser is closed)? #197

Answered by sergiodxa
PiotrJander asked this question in Q&A
Discussion options

You must be logged in to vote

If you don't define a successRedirect when calling authenticate method it will give you back the user data and you'll have to commit the session yourself, at that point you can change the maxAge.

Check https://github.com/sergiodxa/remix-auth#custom-redirect-url-based-on-the-user for how this may work, the example is to change the redirect but the idea is mostly the same, just change where you commit the session.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sergiodxa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants