tymondesigns / jwt-auth

🔐 JSON Web Token Authentication for Laravel & Lumen
https://jwt-auth.com
MIT License
11.3k stars 1.54k forks source link

token reissue on each login #1413

Open chilio opened 6 years ago

chilio commented 6 years ago

Let's consider this scenario... The same user logins via api from 2 different devices. On each subsequent login other device gets unauthenticated... Wouldn't be better, if these 2 devices, could use 2 different tokens? Then each device could also logout separately, without unauthorizing other device. I'm not sure if I'm not missing something? Any thoughts in this area?

chilio commented 6 years ago

Laravel Passport covers all my doubts out of the box. That's why I don't use this package anymore.

ctf0 commented 6 years ago

i can multi-login the user and get a new token on each time, all the tokens will keep working until it gets expired.

unless u want to keep one token per user then maybe try https://github.com/tymondesigns/jwt-auth/issues/800#issuecomment-404699020

also check https://github.com/tymondesigns/jwt-auth/issues/1355