【问题标题】:Cross browser request from Chrome Extension with OAuth.io来自带有 OAuth.io 的 Chrome 扩展程序的跨浏览器请求
【发布时间】:2014-12-04 06:15:22
【问题描述】:

我正在使用 OAuth.io 从 Chrome 扩展程序向 Twitter 进行身份验证。

我已将以下内容添加到我的manifest.json

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

我将 Gmail 域添加到 Oauth.io 中的应用程序:

我得到弹窗并授权,然后我得到以下错误:

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.

有办法解决这个问题吗?

【问题讨论】:

    标签: javascript google-chrome-extension oauth.io


    【解决方案1】:

    我将它添加到 manifest.json 并认为现在已经完成了:

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

    【讨论】:

      猜你喜欢
      • 2017-05-07
      • 2023-03-20
      • 2012-07-10
      • 1970-01-01
      • 2012-04-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多