DEV Community

Discussion on: How to retrieve tokenID from acess_token (Personal Access Token)

Collapse
daniyaljavani profile image
Daniyal Javani

Thank you, it worked for Laravel 8.
use Lcobucci\JWT\Encoding\JoseEncoder;
use Lcobucci\JWT\Token\Parser;

(new Parser(new JoseEncoder()))->parse($token)->claims()->all()['jti']