DEV Community

oriegenbi27
oriegenbi27

Posted on

laravel token not validated for other jwt.auth

I have issue with jwt.auth in Laravel Auth for API, token successfully generated by login but the bearer token not validated for other jwt.auth middleware.

[solved]
update .htaccess in "/public/.htaccess" and then add

<IfModule mod_rewrite.c>
    ...
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
</IfModule>


Enter fullscreen mode Exit fullscreen mode

Top comments (0)