【问题标题】:Chrome extension google oauth 2 issueChrome 扩展 google oauth 2 问题
【发布时间】:2018-05-24 13:33:48
【问题描述】:

我对 chrome 扩展和 google oAuth 2 有疑问。

我在 manifest.json 中添加了所有 oAuth2 内容。

尝试在 background.js 中运行此代码

chrome.identity.getAuthToken({'interactive': true}, function (token) {
    if (chrome.runtime.lastError) {
        console.log(chrome.runtime.lastError.message);
        return;
    }

    console.log(token);
});

昨天一切正常,但今天我收到错误:

OAuth2 请求失败:服务响应错误:'request 参数违反 OAuth2 客户端安全限制'

有什么问题?

【问题讨论】:

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


    【解决方案1】:

    我不知道是什么问题,但在其他 PC 上一切正常。所以,我在我的工作电脑上再次检查了它,现在一切正常。我认为 chrome 中的问题,因为它看起来像 chrome 为 token 缓存了 null 值,只是返回一个错误。

    【讨论】:

      猜你喜欢
      • 2013-11-02
      • 2023-03-25
      • 2014-10-02
      • 1970-01-01
      • 2013-06-18
      • 1970-01-01
      • 2015-08-15
      • 2012-01-09
      相关资源
      最近更新 更多