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

Sign out just on client side ? #161

Closed
ThePhyxius opened this issue Feb 25, 2015 · 1 comment
Closed

Sign out just on client side ? #161

ThePhyxius opened this issue Feb 25, 2015 · 1 comment

Comments

@ThePhyxius
Copy link

Hi, im using angular js with ng-token-auth and rails with devise_token_auth, default configuration on both.
I have an issue signing out. When I sign out, the destroy action in the SessionsController never call sign_out :user, so the user keeps logged in on the server, but is consider to be logged out on the client side because of tokens removal. This allow me to access any route from the rails api even if they have before_filter autenticate_user! from the same device. So the sign out happens only in the client side.

I want to know why is this the default behaviour to this gem. What are the reasons to it?.
I'm really new to this, so maybe there are some things about the workflow that i don't know yet.

@lynndylanhurley
Copy link
Owner

In this gem, the Devise sign_in action only lasts for the duration of each request. This is different from standard Devise, where sessions are used instead of tokens. So we don't really need to "sign out", we just need to invalidate the user's current set of tokens.

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