firefox webextension

时间:2016-05-30 15:22:04

标签: javascript firefox firefox-addon google-oauth

我正在尝试在Firefox Webextension中为Google Drive API获取Oauth2令牌。 我使用background.html加载google Javascript客户端库。但是,当调用使用gapi.auth.authorize的授权时,没有任何反应。

我的分析“授权”尝试为用户打开新窗口以允许/拒绝权限但失败。

在chrome扩展中实现类似的功能,并在chrome的background.js

中执行chrome.identity

manifest.json中的内容安全策略

 "content_security_policy": "script-src 'self' https://apis.google.com; object-src 'self'"

有没有更好的方法来接收Google API的Oauth2令牌?我在上述方法中缺少什么?

感谢。

0 个答案:

没有答案
相关问题