bor1904
8 months ago
207
0
Laravel

JWT Tymon - how to get user id from expired token?

Posted 8 months ago by bor1904

Hello, I want to implement refresh token mechanism in my laravel server API .

I store my refresh_token in user table and create it everytime when user are login.

When access token gonna expired client have to call refresh-token endpoint.

In my refreshToken function I should check if recived refresh_token is exactly thesame as refresh_token from database but I dont know how can I get user id from expired JWT token?

I'm using Tymon JWT v1.0.

Any idea?

thank you

Please sign in or create an account to participate in this conversation.