Why I get Internet Explorer enhanced security error message in Chrome if I call VSO API from Angularjs SPA?

前端 未结 3 838
抹茶落季
抹茶落季 2020-12-19 02:10

I have a SPA implemented in Angularjs - Typescript calling VSO API and providing authentication data you can find below:



        
相关标签:
3条回答
  • 2020-12-19 02:37

    I found that this happened to me when my PAT was wrong due to a copy and paste error.

    Looks like you are probably failing authentication because you didn't base64 encode the bearer token.

    0 讨论(0)
  • 2020-12-19 02:41

    I had this same issue. I verified this in postman as follows...

    I didn't have to base64 encode my PAT. I found that I just needed to double check that my PAT had the right access. I passed the data as Basic Auth. Username: "whatever the hell you want" Password: PAT

    Response: 200

    0 讨论(0)
  • 2020-12-19 02:42

    Prefix your Personal Access Token(PAT) with :(colon). then Base 64 encode it.

    Eg:

    If "myaccesstoken" is my PAT,

    Apply base 64 encoder to ":myaccesstoken"

    In the Authorization header, place your base encoded string as,

    Authorization : Basic MyColonPrefixedBase64String

    0 讨论(0)
提交回复
热议问题