swooletw / laravel-swoole

High performance HTTP server based on Swoole. Speed up your Laravel or Lumen applications.
MIT License
4.04k stars 390 forks source link

Laravel sanctum not work when I use incorrect bearer token #491

Closed Ryan45758 closed 3 years ago

Ryan45758 commented 3 years ago

Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks! (Any non-English issues will be closed immediately.)

  1. Please provide your PHP and Swoole version. (php -v and php --ri swoole) PHP 7.4.18 Swoole Version => 4.6.7

  2. Please provide your Laravel/Lumen version. Laravel v8.32.1

  3. Which release version of this package are you using? "laravel/sanctum": "^2.9" "swooletw/laravel-swoole": "^2.8"

  4. What did you do? If possible, provide a recipe for reproducing the error. when i use the sanctum provide bearer token to get user information, only when the token is run for the first time, user information can be obtained normally, but when I want to obtain new user information for the second time by another bearer token, the old information is returned. If I send the wrong bearer token, it still responds to my number one. User data sent this time, I guess swoole only executes Auth::resolve() once. How can i solve it?

  5. What did you expect to see? I expect that when I use bearer tokens of different users, I can get different user information instead of sending back to me the old ones all the time. Even if it’s a wrong bearer token, it won’t report an error.

  6. What did you see instead? I see it is swoole's problem, but i can't solve it.