How to set once user logged in, whenever user come back and visit a website ,user should be always logged in rather than asking for a log in until user clear a cookie.
Config Code :
grails.plugin.springsecurity.rememberMe.cookieName='xyz_remember_me'
grails.plugin.springsecurity.rememberMe.alwaysRemember=true //if true uses remember me even if no chkbox is in the form
grails.plugin.springsecurity.rememberMe.tokenValiditySeconds=31*24*60*60
grails.plugin.springsecurity.rememberMe.parameter='_spring_security_remember_me'
grails.plugin.springsecurity.rememberMe.key='xyzApp' // should be unique per application
grails.plugin.springsecurity.rememberMe.useSecureCookie=false
Gsp Code :
<input type='checkbox' class='chk' name='${rememberMeParameter}' id='remember_me' checked='checked'/>
<input name="_spring_security_remember_me" type="hidden" value="true"/>
have you tried with an actual check box ? you could even default it to be checked
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With