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

Session isn't reset after logging out #80

Open
jamesfzhang opened this issue Jun 3, 2016 · 2 comments
Open

Session isn't reset after logging out #80

jamesfzhang opened this issue Jun 3, 2016 · 2 comments

Comments

@jamesfzhang
Copy link

jamesfzhang commented Jun 3, 2016

In my app, the user can login via oauth (using omniauth). They log out by calling Devise::SessionsController#destroy. When this happens, current_user is nil, and the session object is reset. All good, seemingly.

However, when the user tries to login via oauth again, and the omniauth callback gets called, current_user is already present! In the callback, session.to_json returns a valid session with the user that was previously logged in. This makes me think that the session isn't resetting properly during logout. I've spent a fair amount of time trying to debug this line by line but haven't gotten anywhere. Has anyone else experienced this problem?

I read over this issue but that was for cookie-store only.

@jasonfb
Copy link

jasonfb commented Nov 3, 2019

This makes me think that the session isn't resetting properly during logout.

is the record still in the table or not after the log-out ?

@h0jeZvgoxFepBQ2C
Copy link

I have the same issue, I delete all sessions in the database, but our devise user still stays logged in and the session gets recreated? wtf

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

3 participants