Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

acoustic85's avatar

How to return the payload from JWT token from external auth api

Hi Guys , as a response after authentication to an external api im receiving jwt token with payload which includes data about the user. Any idea how to access this payload in laravel response ?

0 likes
3 replies
acoustic85's avatar

@martinbean its just a call to an auth external api and I am receiving only this "authorizationToken": and i dont save any users in my database i just have to return the user details as a json object.

martinbean's avatar

@acoustic85 Right? So what have you done to parse the token and return these user details as a JSON object?

Please or to participate in this conversation.