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

Expire token supported? #52

Open
ksenechal opened this issue Apr 9, 2014 · 6 comments
Open

Expire token supported? #52

ksenechal opened this issue Apr 9, 2014 · 6 comments
Labels
question When closed, this issue will become part of the FAQ.

Comments

@ksenechal
Copy link

Is the token expirable?

I didn't see any configuration to achieve this. Is there a way to do it with simple_token_auth?

Thanks in advance!

Kevin

@gonzalo-bulnes
Copy link
Owner

Hi @ksenechal,

There is no specific expiration option. However, you can renew the users authentication tokens quickly by (re)setting the users authentication_token to nil. Once that done, a new token will be automatically generated when saving the record.

@charlesmastin
Copy link

Hello @gonzalo-bulnes,

Was there an intentional decision to omit lifespan attributes? I suppose I can override ensure_authentication_token and authenticate_entity_from_token to support per token lifespans. Thanks for the great work.

@gonzalo-bulnes
Copy link
Owner

No, there is no intention to prevent expiration mecanisms to be used, but none of them has been implemented at this point. By the way, I would be pleased to follow and support your progress in that way if you wanted to share it; that would be -IMHO- a great option to add to Simple Token Authentication. Keep me updated!

@charlesmastin
Copy link

Thanks for getting back. I'm a python guy knee deep in a ruby project so I wouldn't expect much, but I'll keep you posted, especially if it has value for the gem. Thanks for your positive attitude and support. Now go enjoy your vacation (so I read on another issue).

@feliperaul
Copy link

@gonzalo-bulnes , could you please provide example code of where/when, exactly, I would set authentication_token to nil after a login to expire it ?

@gonzalo-bulnes
Copy link
Owner

@feliperaul See #199 I did provide you an example there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question When closed, this issue will become part of the FAQ.
Projects
None yet
Development

No branches or pull requests

4 participants