Chrome扩展程序中的BOX oauth2

时间:2014-04-16 07:15:28

标签: google-chrome-extension oauth-2.0

我正在尝试在Chrome中为box.com构建一个简单的扩展程序。一切都很好,直到Box将令牌返回到扩展名,我得到了这个

  

拒绝加载chrome-extension://finiioneilhchmigihgjmjbaopjjeggo/authentication.html?state = authenticated& code = Epmau2e0WZKFYojl2FpH9Kux39nVs82V。资源必须列在web_accessible_resources清单键中,以便由扩展名外的页面加载。

很明显,我需要在web_accessible_resources清单键中列出文件authentication.html。我做了两件事

"web_accessible_resources": ["chrome-extension://finiioneilhchmigihgjmjbaopjjeggo/authentication.html"],

finiioneilhchmigihgjmjbaopjjeggo是我应用的ID btw)和

"web_accessible_resources": ["authentication.html"],

但它们都不起作用。我该怎么做才能解决这个问题?

谢谢,

1 个答案:

答案 0 :(得分:0)

我知道它不是'干净'和/或它应该做的方式,但将manifest_version改为1对我有用。这只是解决方法: - (