Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Persistent remember me #151

Closed
maxmos10 opened this issue Aug 8, 2015 · 3 comments
Closed

Question: Persistent remember me #151

maxmos10 opened this issue Aug 8, 2015 · 3 comments

Comments

@maxmos10
Copy link

maxmos10 commented Aug 8, 2015

I'm trying to do an implementation of remember me which last for one month.

I followed the example on https://github.com/t2v/play2-auth/tree/master/sample/app/controllers/rememberme. Then I override AsyncIdContainer to store the token in a database instead.

Where to go after this?

Should I change the behavior of RememberMeTokenAccessor when checking for remember and maxAge? What's your thought?

@maxmos10 maxmos10 changed the title Persistent remember me Question: Persistent remember me Aug 8, 2015
@gakuzzzz
Copy link
Member

I still not catch your problem...

Do you have what the trouble?

@maxmos10
Copy link
Author

Hi gakuzzzz,

Following the example from RememberMe, I log in using routes /rememberme/.
After login is successful, I close the browser. Then, i believe that the Cookie maxAge will be set to None.

If I close the browser for the 3rd time, then user will have to login to access /rememberme/messages/main. How do I avoid that?

@gakuzzzz
Copy link
Member

maxAge == None means that the cookie life is until the browser closing.
If you want to keep the session until browser reopen, you should write maxAge explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants