Gajanan
Gajanan

Reputation: 39

Uber Oauth token fails in angular

I am trying to hit the uber authorization and get the token, but getting below error

POST https://login.uber.com/oauth/v2/token 401

Access to XMLHttpRequest at 'https://login.uber.com/oauth/v2/token' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

angular-oauth2-oidc-codeflow.js:701 Error getting token

I'm using angular 8
"angular-oauth2-oidc-codeflow": "^4.0.1"
for uber auth - https://www.npmjs.com/package/angular-oauth2-oidc-codeflow

Upvotes: 0

Views: 177

Answers (1)

rafi muhammad
rafi muhammad

Reputation: 192

The easy way is to just add the extension in google chrome to allow access using CORS.

(https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi...)

Upvotes: 0

Related Questions