donkfather's avatar

Passport test with Postman

Hello everyone,

I have tried to follow the video Laravel Passport from Laravel 5.3 but I'm stuck.

I have done everything that Taylor did and when he test the api auth with Postman he gets the user data back and I get error:Unauthenticated.

Am I missing something ?

Furthermore I have tried with Postman's authentication system OAuth2 and still same response.

Thank you

0 likes
7 replies
poxin's avatar

Yeah I'm still having a ton of issues with the package too unfortunately. Personal Tokens work, but nothing else no matter what I try.

Hoping @JeffreyWay covers this in a little more detail on the 5.3 series.

donkfather's avatar

well .. i did the exact same thing as taylor in that video. I created a Consumer app with his code provided by Matt Stauffer here : https://mattstauffer.co/blog/introducing-laravel-passport and I managed to make it to give me the authorization page ( for some reason it didn't work at first... ) and after pressing the authorize button it was saying that guzzlehttp/client class was not found. I install guzzlehttp/guzzle and now the server ( valet ) fails . Keeps on loading and loading and ... loa....g .

jekinney's avatar

@donkfather sounds like a redirect to a redirect circle.

I believe the keys are passed in headers like csrf token etc. you have to set each header explicitly in Postman.

donkfather's avatar

@jekinney This redirect loop happens after I press the authorize button in the consumer app. I quit trying to make postman work :)

hoaixuimay's avatar

@donkfather I also met this problem, and luckily it worked after hours for finding. Stupid error :D I found that the problem is value contain ":" after Bearer in Authorization. I removed then it worked

Bearer my_token_here

3 likes

Please or to participate in this conversation.