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

Feature: Token expiration #23

Open
rockfridrich opened this issue Jun 6, 2014 · 10 comments
Open

Feature: Token expiration #23

rockfridrich opened this issue Jun 6, 2014 · 10 comments

Comments

@rockfridrich
Copy link

Are you going to provide token expiration functionality? It is very useful for Mobile Apps API's
Thank you!

@tappleby
Copy link
Owner

tappleby commented Jun 8, 2014

I am hoping to revisit how the tokens are generated soon. I had looked into possibly using Json Web Tokens (JWT) instead of storing them in the db (JWT can support expiration).

The one challenge with storing the tokens in the DB is when they become invalid, you will need a cron job to clean out the old entries.

@atinder
Copy link

atinder commented Jun 12, 2014

+1

1 similar comment
@dennisoderwald
Copy link

+1

@Tasemu
Copy link

Tasemu commented Aug 14, 2014

+1

@AntonNiklasson
Copy link

Any progress on this one?

@tappleby
Copy link
Owner

tappleby commented Sep 2, 2014

None yet, it will probably come with a redis driver.

For the database driver I was thinking of integrating with the Indatus/dispatcher package to handle cleanup of expired tokens.

@jrm2k6
Copy link

jrm2k6 commented Feb 17, 2015

Any news on this?

@tappleby
Copy link
Owner

Still none yet. I haven't used this library in over a year which means it hasn't been getting much of my attention lately.

The dilemma I am facing right now is the upcoming plans I had for this package are now mostly covered by tymondesigns/jwt-auth, I'm not sure if it makes sense to have 2 packages doing almost the same thing.

@jrm2k6
Copy link

jrm2k6 commented Feb 17, 2015

Yes, I see, this is what I have also been checking. I just started on a new project at work on your package was already in use, so I decided to go with it. Maybe switching to jwt-auth is the right thing to do.

@iparq
Copy link

iparq commented May 14, 2015

Actually, I don't want to clear out old entries. They make a nice record of login attempts and I don't really care about keeping the table small. Furthermore, I would like it to be possible to honor multiple tokens for a period of time. Why?

The auth tokens are used to authenticate mobile apps that are used like cash registers. The mobile apps are often deployed in areas of sketchy connectivity. They will store data locally until a good network connection becomes available again. Each single transaction has the auth token recorded with it. It has been known to happen that a device's battery simply dies in the field and it gets set aside. The user will start using a new device. The old device hasn't uploaded its transactions yet. When the device finally gets a charge and a network, I find the auth tokens are gone and I'm stuck with a device with a bunch of field records on it with invalid auth tokens. This is WAY NOT COOL according to my clients.

Thus, I need the tokens to stay in the database, forever. But I want to configure a max age for which one will be honored, along with a soft delete, for forced logout (like when a user turns in their device and cashes out).

Those are my requirements, I'll be forking now to get them...;-)

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

8 participants