Cross browser request from Chrome Extension with OAuth.io

188 views Asked by At

I'm using OAuth.io to authenticate to Twitter from a Chrome Extension.

I've add the following to my manifest.json:

  "externally_connectable": {
      "matches": ["https://oauth.io/*"]
  },

I added the Gmail domain to the app in Oauth.io:

oauth.io

I get the popup and authorize, and then I get the following error:

XMLHttpRequest cannot load https://oauth.io/request/twitter/%2Fme. The 'Access-Control-Allow-Origin' header has a value 'https://mail.google.com' that is not equal to the supplied origin. Origin 'chrome-extension://chpcljbkkhhgnjpibemapkkioceikfmp' is therefore not allowed access.

Any idea a way around this?

1

There are 1 answers

0
brandonhilkert On

I added this to the manifest.json and think that did it for now:

  "permissions": [
    "https://oauth.io/*"
  ],