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

"Remember me" enabled by default if module installed #282

Open
frederikhors opened this issue Feb 1, 2020 · 5 comments
Open

"Remember me" enabled by default if module installed #282

frederikhors opened this issue Feb 1, 2020 · 5 comments

Comments

@frederikhors
Copy link
Contributor

frederikhors commented Feb 1, 2020

Issue opened for the creation of a wiki page that summarizes the doubts and problems for newbies (#210).


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?

@aarondl
Copy link
Member

aarondl commented Feb 10, 2020

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?

@frederikhors
Copy link
Contributor Author

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.

@aarondl
Copy link
Member

aarondl commented Feb 11, 2020

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.

@frederikhors
Copy link
Contributor Author

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?

@aarondl
Copy link
Member

aarondl commented Feb 11, 2020

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.

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