jadjoubran / laravel5-angular-material-starter

Get started with Laravel 5.3 and AngularJS (material)
https://laravel-angular.readme.io/
MIT License
1.66k stars 400 forks source link

decode token #411

Closed proxnoob06 closed 7 years ago

proxnoob06 commented 7 years ago

Hello Guys, I would like to ask how can i decode a token?

I already tried JwtAuth::decode($token) but i got this error :

{"message":"Argument 1 passed to Tymon\\JWTAuth\\JWTManager::decode() must be an instance of Tymon\\JWTAuth\\Token, string given","status_code":500}

my objective are: 1.I want to a post token from other Apps(which we are also developed) and login using token.

  1. Decode token to get payload information for queering user if valid.
    • Laravel & Angular version: 3.2.0
jadjoubran commented 7 years ago

Can you show a sample code?