我開發了一個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