0
votes

I am newbie in laravel. I installed laravel 5.7 with passport . I successfully done the login and got the user access token . Actual problem is I wrote a route which is used to fetech user deatlis . Then I access the url with the token but it's showing unauthenticated message.

I used the laravel default server in my local system and vue axios client for request to server .

Thanks in advance.

1
Well, it's like finding a needle in a haystack without seeing the code you've tried. - B_CooperA

1 Answers

0
votes

The solution is adding this to .htaccess of root folder. it helped for me

RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

Without this configuration, the Authorization header will be ignored in your app running