-
Notifications
You must be signed in to change notification settings - Fork 71
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
how to handle logout #20
Comments
hey @mic0331
Anyway, I'm going to ask few smart guys about and update ticket with info :) |
After a bit while, I don't think it's possible. Some good input from Vinay.
|
Yeah if we do a refresh interval shorter than the expire interval, it should work. The frontend code will need to "forget" (delete from localStorage) the token on logout though. The only concern it looks like is to hope that some one isn't able to grab the token before it expires. Even if they do, they only have max 15mins to use it. We do have to make sure the refreshing of the token is robust enough not to be easily faked. Otherwise, assuming someone has a token, they could just keep refreshing the token on the user's behalf. |
I agree, keeping the token-ttl short, using SSL and implementing invisible client refresh of token is the way how to handle the stuff. |
Hi @alexanderbeletsky
thanks for your tweet about the authentication snippet for backbone ;-)
I finally spent some time integrating your code into a project of mine and find this backbone.basicauth that might be very useful when using your hmac security scheme.
https://github.com/fiznool/backbone.basicauth
So far your security solution is working well but i'm questioning now about the logout phase. How to permanently log out a user? As far as i know basic auth is not offering any solution to permanently log out a user. What do you think ?
My webapp is using cookies authentication so at logout i can destroy the cookie and the user cannot access secure pages anymore BUT on the other hand, my REST api is hosted on a different server and therefore is not using the cookies auth but just the basic auth system. At logout from my app i cannot access the webapp anymore but the REST endpoints are still accessible...
Any idea on how to make a proper basic auth logout via jquery or backbone ?
Also something to consider in your boilerplate, i'm using passeport.js with local strategy. This plugging hugely simplify the code and offer something proven for a big app.
The text was updated successfully, but these errors were encountered: