How do I set maxAge on session (so that login is remembered after browser is closed)? #197
-
In a typical login form, there is a "remember" checkbox. If set, session cookies will have In the Indie stack Remix starter, this is implemented like this:
How do I achieve this with Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If you don't define a successRedirect when calling 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. |
Beta Was this translation helpful? Give feedback.
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.