【发布时间】:2017-09-08 20:57:41
【问题描述】:
我正在将我的应用程序移植到 Electron,我惊讶地发现 Dropbox 身份验证在这种环境中不起作用。不过,它确实可以在 Chrome 中使用。
登录按钮保持禁用状态,标签显示在输入上方。
控制台中显示以下消息:
Content-Security-Policy 指令“worker-src”在当前禁用的标志后面实现。
我正在 OS X 上使用 dropbox@2.5.7、electron@1.7.7 进行测试。
我发现了一个类似的问题,但它似乎使用了不同版本的 Electron 并且有不同的错误消息:
Dropbox oauth view is not rendering properly
更新:
Content-Security-Policy 消息似乎与 Chrome 版本有关。 worker-src 指令是在 Chrome 59 中引入的,electron@1.7.7 随 Chrome 58 一起提供。
https://www.chromestatus.com/feature/5922594955984896
我已经用 Chrome 59 附带的 electron@1.8.0 进行了测试,控制台消息消失了。但是身份验证页面的问题仍然存在。
【问题讨论】:
-
不幸的是,这里的答案实际上与as I commented in the other post 相同。 Electron 不是officially supported for the Dropbox site,所以不太可能修复。
标签: oauth electron dropbox-api