thephpleague / oauth2-server

A spec compliant, secure by default PHP OAuth 2.0 Server
https://oauth2.thephpleague.com
MIT License
6.49k stars 1.12k forks source link

How do I get a token by $tokenId #1294

Closed t3touch closed 1 year ago

t3touch commented 1 year ago

I'm struggling with the revokeRefreshToken($tokenId) method inside my RefreshTokenRepository. Which is the right way to get the refresh token by $tokenId and how can I revoke/invalidate the token?

eugene-borovov commented 1 year ago

This example is a good start.

t3touch commented 1 year ago

Thanks. But it does not show how to identify and/or revoke an existing refresh token by $tokenId.

eugene-borovov commented 1 year ago

Just remove the token from a storage. It may be hard or soft delete. There is an example with soft delete.

t3touch commented 1 year ago

Ahhh. Ok, I misunderstood some things ;-) Thanks