-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Remembering the user from a saved cookie #102
Comments
Hi! Passwordless uses Rails' cookie based session store already (docs) which uses Rack's own session storage https://www.rubydoc.info/gems/rack/Rack/Session/Cookie. Have you tried bumping |
Just to add a bit more to this, @alessandrostein -- https://github.com/mikker/passwordless#configuration might help you figure out how to bump the period higher. Something like |
Thanks for the explanation. My passwordless initializer was settted
Could be this long period (1 year) not supported? |
I was able to simulate using Google Chrome in my Android smartphone. After closes the browser or restart the Android system, we lost the session. |
Thanks for chiming in, @rickychilcott! You're absolutely right. In for example Rails.application.config.session_store :cookie_store,
expire_after: 1.year,
# ... |
Just to letting you know folks. This is what I was looking for and it's fixed my problem. |
Glad you figured it out! Starting to think we should add this bit to the README too. |
My Rails 7 app was kicking out users after quitting their browser. Fixed it with @mikker's suggestion 🙏. Since Passwordless defaults don't seem to play along nicely with Rails 7 defaults, maybe we should indeed add this to the README. Or change the default config to match Rails' approach, which [I think] is to expire the cookie when the browser session ends. |
Hey 👋
We usually receive feedback from users who log in via smartphone (only mobile) using Passwordless but not saving a session for a short period (like 1 day), forcing the users to ask for a new code every time.
There is an alternative like http://www.rubydoc.info/github/heartcombo/devise/master/Devise/Models/Rememberable, or this is not a recurring problem for your users?
The text was updated successfully, but these errors were encountered: