-
Notifications
You must be signed in to change notification settings - Fork 69
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
Unexpected session expiration in secondary device #454
Comments
I don't know how that column actually looks like in the DB and I'm not an expert on Devise myself but what you suggest of sign_out_all_scopes sounds good. |
Sadly don't work as expected 😞
Also I don't see that Actually I'm not sure what is the behaviour expected of changing this variables. I didn't find it in Devise documentation https://www.rubydoc.info/github/plataformatec/devise/Devise/Models/Rememberable |
Then we might need to check Devise's codebase |
I think this matches with the behaviour described on this Devise's issue: heartcombo/devise#5212 |
Also, I think we could have tried to set |
I have been investigating why the session closes in the mobile app (webview).
After a bit of headache trying to find the pattern, I think I understood what is going on.
The problem happens when user check "remember me" on login: this is the default behaviour on mobile app. In DB is stored as
REMEMBER CREATED AT
dateAfter that if this user login on desktop and close the session on desktop
REMEMBER CREATED AT
field is reset to null, and the session on mobile will expire in 1 hour (devise config.timeout_in)So is there a way to avoid this behaviour? We want to keep
REMEMBER CREATED AT
on app session.I found this config in
/config/initializers/devise.rb
, I'm not sure if its the solution:Extra
We want to persist the session on mobile app, the remembereable option is for 4.weeks so we need to update
REMEMBER CREATED AT
the next time the user interact with the app, I think this can be done also in/config/initializers/devise.rb
What do you think? @markets @mllocs @sauloperez @enricostano
The text was updated successfully, but these errors were encountered: