web-components
web-components copied to clipboard
[login] Add "remember me" checkbox
Missing feature: "Remember me" checkbox, which you could check if you want your login info to be stored so that you don't need to log in again with the same browser unless you log out or some amount of time passes.
I agree with @OlliTietavainenVaadin
Will this be implemented? We missing that feature
I can't wait for an out of the box solution for a 'remember me' button. That is a must feature for modern apps.
I agree that this would be a highly appreciated feature for Vaadin's login component.
This feature is very much needed. What is a temporary workaround? Only the Mozilla browser remembers your username and password at the moment and autofill fields.
@Suplab-commits If you use Spring Security you could enable it by default:
http.rememberMe().alwaysRemember(true)
@timomeinen Hello. I've tried a million ways, including this one. But if the user is not active for some time, then the session ends anyway, although the validity of the token I set is one year. Why is this happening? All settings work in Security Configuration, except "remember Me". Here is my "Security Config" class. Please help me. SecurityConfiguration.zip
@Suplab-commits This is no place for Spring Security support. Please have a look at the docs.
But from what I see in your example, remove the rememberMeServices
bean. Your tokenRepository
is sufficient. This should do it:
http.rememberMe()
.alwaysRemember(true)
.tokenRepository(tokenRepository())
.and()
I have created an example project here with a README: https://github.com/jcgueriaud1/remember-me