"Remember me" enabled by default if module installed
Issue opened for the creation of a wiki page that summarizes the doubts and problems for newbies (https://github.com/volatiletech/authboss/issues/210).
- https://github.com/volatiletech/authboss/blob/master/remember/remember.go#L43-L48
- https://github.com/volatiletech/authboss/blob/master/values.go#L69-L76
- https://github.com/volatiletech/authboss/blob/master/defaults/values.go#L52-L56
I have read these lines but I have not been able to understand if there is a way to avoid the rm field in the login form and activate the "remember me" module by default if present.
In other words if in my authboss.Config there is a (let's say) AutoRememberMe = true option I want enable by default the "Remember me" module as if in my form I had checked the rm field.
Does this make sense?
Turning the module off is done by not importing the module. Is there a reason you'd want to both import it but also not use it?
I badly explained myself. I'm sorry.
I would like to avoid passing the "rm = true" field from the client (javascript or server-rendered form) during the login phase.
Ah, you would need to add a new feature to the remember me module to "always remember". But I think you would just add a hidden field called rm.
you would just add a hidden field called rm
Yep. I'm doing this right now. But I think it's an hacky way. Don't you think?
That's why I said you either have to do that or add a feature to authbosses module haha. I think that in the realm of hacky things this is one of the least hacky things there is. It's like sending a parameter into a function. No big deal. Costs next to nothing.