【发布时间】:2016-06-13 03:36:24
【问题描述】:
我开发了一个 html5 页面来列出 google 驱动器文件并使用 PhoneGap 服务器进行测试。一切正常,因为我创建了一个配置了 http://localhost:3000 的 Oauth2。
当我尝试使用 SHA1(也在 google drive 控制台中的 Oauth2 上配置)测试 APK 文件时,我收到了错误:
Refused to display 'https://accounts.google.com/o/oauth2/auth?client_id=<KEY>' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. I understand that this error is because the Oauth2 doesn't expect the origin. But the Origin is not http, if file know... (file:///android_asset/www/index.html). The GoogleAPI Console doesn't accept 'file' protocol... just 'http'.
我该如何解决这个问题?
【问题讨论】:
-
你可以通过类似的 SO question查看我的答案
标签: android html cordova google-drive-api