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

Reset devise session cookies on logout #96

Merged
merged 2 commits into from
Jun 5, 2020

Conversation

eoinkelly
Copy link
Contributor

The default devise behaviour does not invalidate session cookies after logout so if an attacker can retrieve a cookie from a session they can use it even if the user has logged out.

We have used variations of this change successfully on a number of Rails apps in production.

References

Fixes #91

eoinkelly added 2 commits June 4, 2020 06:49
The default devise behaviour does not invalidate session cookies after logout
so if an attacker can retrieve a cookie from a session they can use it
even if the user has logged out.

We have used variations of this change successfully on a number of Rails
apps in production.

References

* heartcombo/devise#3031
* http://maverickblogging.com/logout-is-broken-by-default-ruby-on-rails-web-applications/
* https://makandracards.com/makandra/53562-devise-invalidating-all-sessions-for-a-user

Fixes #91
@eoinkelly eoinkelly merged commit 76f4d71 into master Jun 5, 2020
@eoinkelly eoinkelly deleted the reset-devise-session-cookies-on-logout branch June 5, 2020 03:27
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

Successfully merging this pull request may close these issues.

Devise: Reset session on log out
3 participants