You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.
A common use case is to optionally remember the user beyond the current session i.e. if the user checks the 'Remember me' checkbox on the login page then we set cookieMaxAge to 30 days or similar, otherwise the cookie expires when the browser is closed.
An example implementation would have a 'global' application cookie settings with cookieMaxAge = Nothing and on each login could set cookieMaxAge = Just $ fromInteger $ 30 * 24 * 60 * 60 if the 'remember me' option was set.
Currently it seems that subsequent requests will use the 'global' settings and therefore override the max age set on initial authentication. A solution would be that a cookie carries all it's own cookie settings (signed and tamper proof) and recalculates max-age and expires based on current time.
Hope I haven't overlooked anything above.
The text was updated successfully, but these errors were encountered:
A common use case is to optionally remember the user beyond the current session i.e. if the user checks the 'Remember me' checkbox on the login page then we set cookieMaxAge to 30 days or similar, otherwise the cookie expires when the browser is closed.
An example implementation would have a 'global' application cookie settings with
cookieMaxAge = Nothing
and on each login could setcookieMaxAge = Just $ fromInteger $ 30 * 24 * 60 * 60
if the 'remember me' option was set.Currently it seems that subsequent requests will use the 'global' settings and therefore override the max age set on initial authentication. A solution would be that a cookie carries all it's own cookie settings (signed and tamper proof) and recalculates max-age and expires based on current time.
Hope I haven't overlooked anything above.
The text was updated successfully, but these errors were encountered: