Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

feat: set cookies' expires attribute and fix remember me #530

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

gucheen
Copy link
Contributor

@gucheen gucheen commented Aug 3, 2023

Since modern browsers set cookies' expires to 'session' by default (clear these cookies after user close browser), remember me will not work currently.

This PR adds some logic to create cookies with an expiration time from response. Now these cookies will have correct expiration time (will not be deleted after closing browser) .

Remember Me will work correctly after this fixing.

And maybe we don't need to validate cookies' expiration times in frontend (cookies will be deleted by browser after they expire).

@hay-kot
Copy link
Owner

hay-kot commented Aug 10, 2023

can't believe I missed this, thank you!

@hay-kot hay-kot merged commit b5987f2 into hay-kot:main Aug 10, 2023
3 checks passed
hay-kot pushed a commit that referenced this pull request Jan 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants