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

Flask-login like "Remember me" functionality #5

Closed
rubenvdham opened this issue Apr 1, 2018 · 2 comments
Closed

Flask-login like "Remember me" functionality #5

rubenvdham opened this issue Apr 1, 2018 · 2 comments

Comments

@rubenvdham
Copy link

Is the Flask-login like "Remember me" functionality supported in Sanic-auth?

@pyx
Copy link
Owner

pyx commented Apr 2, 2018

Hi.
By saying "supported", if you meant "Does Sanic-Auth implement this feature", then no, if you meant "Is it possible to roll your own without changing Sanic-Auth's source code", then yes.

With some safe (prevent user tampering, etc.) way to handle cookies, you can add your "Remember me" logic into your login routine, e.g. subclass class Auth and override method Auth.current_user, check for "Remember me" token first, fallback to Auth.current_user.

Hope this helps.

@rubenvdham
Copy link
Author

Thanks for the reply!

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