Sanctum Version 2.15.1
Laravel Version 7
PHP Version 7.4
Description I am using Swoole to start a web service and using Sanctum for authentication in Laravel 7. However, there is an issue: after successfully logging out, the token table in the database is cleared but still shows as logged in status. Only after restarting Swoole and making a new request will it prompt for a token again. How can I clean up excess authentication data to avoid continuously occupying memory and keeping users in a logged-in state?
Logic code for logging out
Auth::user()->tokens()->delete();
I hope to initialize this verification instance every time I use it.
Please help me, thank you.