Closed chrisvidal closed 4 years ago
Thanks for reporting it @chrisvidal - I'll try to check it ASAP, but if you want to submit a PR to fix it, I'll accept it.
I'd love to. I traced back until the Tymon library. It seems that the request headers is not passed properly to the jwt library parsing the token. That's I got so far
I was checking it and I just remember that you opened the same issue once in the past. https://github.com/rluders/oc-jwtauth-plugin/issues/1
Can you confirm if the issue is the same and if the proposed solution solves it?
oh you are right - I didn't manage to solve it at that time.
Using Apache, I tried to insert this piece of code but it does not work either
RewriteCond %{HTTP:Authorization} ^(.)
RewriteRule . - [e=HTTP_AUTHORIZATION:%1]
ok after hours of research, it is due to Apache 2.2.
the correct .htaccess
that works for me is
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
which is slightly different from the one provided by the Tymon JWT
I think it should be mentioned in the documentation here, what do you think?
I agree.
The login part seems to be working, my vuejs app receives a token then try to access the route
api/auth/me
but receives a401 No token provided
When I look at the API response, I can see that the header is containing the token as such: this is the javascript log of the 401 error returned by the API: