Error with request using auth0 JWT token in Angular -


problem request when using auth0 jwt token in angular.

i'm use angular2-jwt auth0

scenario: have angled application using jwt auth0 working perfectly, have discovered request problem. when log in application uses xsrf-token in browser, application stops working , no longer supplies correct header.

request headers

> accept:application/json, text/plain, */* accept-encoding:gzip, > deflate, br accept-language:pt-br,pt;q=0.8,en-us;q=0.6,en;q=0.4 > authorization:jwt > eyj0exaioijkv1qilcjhbgcioijiuzi1nij9.eyj1c2vyx2lkijoxlcj1c2vybmftzsi6imfkbwluiiwizxhwijoxnta1mtywndu1lcjlbwfpbci6inn1cg9ydgvabxd0as5jb20uyniifq.hk7nxi3ztmbtczkkfnwdumqfucssdpnr9rokofbibaw > connection:keep-alive content-length:51 content-type:application/json > host:127.0.0.1:8000 origin:http://localhost:4200 > referer:http://localhost:4200/login user-agent:mozilla/5.0 (macintosh; > intel mac os x 10_12_6) applewebkit/537.36 (khtml, gecko) > chrome/60.0.3112.113 safari/537.36 

now request when there xsrf-token inside cookie

> accept:*/* accept-encoding:gzip, deflate, br > accept-language:pt-br,pt;q=0.8,en-us;q=0.6,en;q=0.4 > access-control-request-headers:authorization,x-xsrf-token > access-control-request-method:get connection:keep-alive > host:127.0.0.1:8000 origin:http://localhost:4200 > referer:http://localhost:4200/login user-agent:mozilla/5.0 (macintosh; > intel mac os x 10_12_6) applewebkit/537.36 (khtml, gecko) > chrome/60.0.3112.113 safari/537.36 

when xsrf-token exists header jwt not sent , replaced.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -