dust

Problem with Passport laravel_token

Posted 5 days ago by dust

I'm following documentation here: https://laravel.com/docs/5.6/passport#consuming-your-api-with-javascript But I'm getting 401 - Unauthorized.

I can see that I have cookie named "laravel_token" in browser cookies and it is HTTP cookie. I also see in debug bar, that this cookie persists in request_headers :

"cookie" => array:1 [
    0 => "laravel_token=eyJpdiI6 ....

in request_server:

"HTTP_COOKIE" => "laravel_token=eyJpdiI6I ... 

and in request_cookies:

"laravel_token" => "eyJpdiI6Imly

but I'm still unauthorized!?!?!

What I'm doing wrong?

If I send token in request_headers as Authorization = Bearer , it works.

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