angularjs - Laravel not detecting auth token sent in the header and JWT package -


i have set ionic app , started using laravel api. works great in postman , ionic until point sent token.

using package called satellizer angular, adds token in local storage header.

my issue is, receive token not provided error.

in postman, if call: /api/v1/authenticate/user?token=tokenkey

then works fine, if hard code same url token set in url params in angular http request works.

however, when using postman , setting authorisation params in header to:

token : tokenkey 

i missing token error again. in angular, when making request /api/v1/authenticate/user have checked header params , can see authorisation has been set " bearer tokenkey".

any why not getting picked laravel? have found information apache removing auth header , added this:

rewriteengine on rewritecond %{http:authorization} ^(.*) rewriterule .* - [e=http_authorization:%1] 

to apache config file on mamp, restarted same issue.

any more suggestions?

try using

rewriterule ^ - [e=http_authorization:%{http:authorization}] 

in public/.htaccess.

related issue on stackoverflow: laravel in apache getting header value

related issues on github: https://github.com/dingo/api/issues/54 , https://github.com/sahat/satellizer/issues/300


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -