为什么所有令牌在laravel中使用jwt auth都有效

When I login multiple time and then JWT Auth generate multiple token and all token is valid why. I need only one token valid.

There is no built in mechanism to it, but you can do it by storing all the created token in database and check manually, also you can use JWTAuth::invalidate(JWTAuth::getToken()); to invalidate any token. Check some thread in github to get better idea on it.

  1. Ability to expire all user tokens

  2. Max tokens per user

  3. Blacklist Based on User ID