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

Clear auth instance on every requests #505

Closed ad-mos closed 2 years ago

ad-mos commented 2 years ago

Currenly auth instance is resseting after swoole reload/restart, and after user login - it shares auth across all other requests.

This commit fixes: 1) Logout user after swoole reload 2) Share auth instance across all requests

Arkanius commented 2 years ago

Hi There!

Actually, it was changed here: https://github.com/swooletw/laravel-swoole/commit/3a93e92c8b8ad5eed8bbdf4398faa22bdef48b4f

ad-mos commented 2 years ago

Did you see my commit? It rollback your change, because it totally broke laravel auth. Putting Auth instance in pre_resolved array makes it the same instance between different user requests.

ad-mos commented 2 years ago

@Arkanius Tested on clean Laravel 8 install.

ad-mos commented 2 years ago

Hi @albertcht, can you please take a look on this?

Arkanius commented 2 years ago

You're saying that you are getting the same user authenticated in all requests?