Laravel Passport and logout - how to cleanly and really logout? #51964
Unanswered
cariboufute
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I am implementing Laravel Passport in a new Single Sign-On app using the authorization code grant process. Everything went smoothly until I implemented the logout process.
I started by revoking the tokens and logging out with the web guard, as written in the docs. However, accessing the Passport guarded routes was still possible with the revoked access token. Revoking all user related tokens and regenerating request session wasn't enough either.
The only way to really logout and make the protected routes unaccessible again was to delete all session related to user_id in the database!
Here is the code.
Is there a less crude way to effectively logout of Passport?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions