DEV Community

loading...

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

Collapse
khaireddines profile image
Acewings • Edited

laravel = 8,
Lcobucci\JWT = 3.4
solution is =>
dev-to-uploads.s3.amazonaws.com/up...

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']