我开发了一个html5页面来列出谷歌驱动器文件并使用PhoneGap服务器进行测试。所有工作正常,因为我创建了一个配置为http://localhost:3000的Oauth2。Android App + Cordova + HTML5 + Google Drive Api
当我试图测试APK文件,与SHA1(也的oauth2配置在谷歌驱动器控制台),我收到的错误:
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问题(http://stackoverflow.com/questions/35746756/how-implement-google-drive-in-ionic-app/42412306#42412306) – JcDenton86