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

Added Remember Me feature #276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bahymohammmed
Copy link

This is a new feature to add remember me feature in login view.

Here's the change log:

  • In class Authenticator I've changed toCookie method signature to accept a new argument which is rememberCookie as boolean
  • I've rewrote the structure of the login form to accept the LoginInfo object instead of accepting tuple(String, String)
  • Add a new class case class LoginInfo(username: String, password: String, remember: Option[Boolean]) to be used in the new form loginFormWithoutRemember instead of accepting two strings as username and password, so we pass the remember me option along side with the credentials
  • Added lazy val withRememberMe = current.configuration.getBoolean(RememberMe).getOrElse(false)
  • Modify the view to add remember me checkbox at /views/provider.scala.html

@tuxBurner
Copy link

Coool one :)

@bahymohammmed
Copy link
Author

Thanks :-)

@vchuravy
Copy link

This would be quite nice to have :) Is there anything holding it back from being merged? I would be willing to do some work if it needs to be polished up.

@bahymohammmed
Copy link
Author

really don't know why it's not merged yet !

Thanks for your support :-)

@vchuravy
Copy link

@jaliss Any comments? I really like your work on securesocial, but this is a bit that is missing for me.

@Ingwar
Copy link

Ingwar commented Dec 23, 2013

+1

1 similar comment
@arpadtamasi
Copy link

+1

@jaliss
Copy link
Owner

jaliss commented Jan 22, 2014

@bahymohammmed is this working for you? From what I see you are making the cookie transient if the user checks on the "remember me" option at login time.

@AdrianScott
Copy link

This would really help speed up dev time, so one doesn't have to re-login after each server reload...

@jaliss
Copy link
Owner

jaliss commented Jan 29, 2014

@AdrianScott if you want to prevent loosing your session on reach reload you can write your own version of the AuthenticatorStore (that does not use the Play cache) or configure the Play cache so that it persists things in disk. To do that change the ehcache.xml file and set diskPersistent="true".

@AdrianScott
Copy link

Thank you! I appreciate it. (still needing a 'remember me' for my users sometime soon also, hehe )

@jaliss
Copy link
Owner

jaliss commented Jan 31, 2014

@AdrianScott you're welcome. Will keep this in mind :)

@ludwigm
Copy link

ludwigm commented Mar 19, 2014

+1 (Any news on integrating this? I think this is a very important feature I would really appreciate)

@chazzzz
Copy link

chazzzz commented Apr 22, 2014

Hi! I'm currently needing this feature. Any news?

@enotys
Copy link

enotys commented May 26, 2015

Why not merged this feature ? I need It! It is very important feature!

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

Successfully merging this pull request may close these issues.

None yet