Reputation: 96
I would like to know what is the best way to manage tokens in oauth_access_tokens tables of Laravel passport when logout users from API call?
Currently I have only set 8 hours expiration for the token, and keep all the tokens there.
Thanks for your help.
Upvotes: 3
Views: 212
Reputation: 1783
php artisan passport:keys --length=512 --force
# create 512 character length tokens and etecetera
Upvotes: 0
Reputation: 21
If the users logs out then maybe you should remove them. You can add a subscriber to the log out event and do it from there. Take a look at:
https://laravel.com/docs/master/events#writing-event-subscribers
Upvotes: 1