所以我有一个应用程序女巫使用云端点来连接应用程序引擎后端。它在物理设备和安迪模拟器上完美运行。
然而,当我尝试在 arc 上进行身份验证时,我在 javascript 控制台中收到以下错误
Authentication error Error: Invalid OAuth2 scopes
使用以下堆栈
"Error: Invalid OAuth2 scopes.
at Error (native)
at Object.callback (chrome-extension://kanlgeedkacgohmccakppmlicnfgfpnl/_modules/mfaihdlpglflfgpfjcifdjdjcckigekc/gen_index.min.js:36:159)
at safeCallbackApply (extensions::sendRequest:21:15)
at handleResponse (extensions::sendRequest:73:7)"
auth.js:94 上发生错误,女巫看起来像这样
/** @private */
AuthManager.prototype.handleGetAuthToken_ = function(message) {
console.log('Authentication requested', message);
var reply = (function(data) {
var responseMessage = {
namespace: 'androidIdentity',
command: 'getAuthTokenResponse',
data: data
};
this.plugin_.postMessage(responseMessage);
}).bind(this);
var options = { 'interactive': true };
var scopes = this.parseScope_(message.data.tokenType);
if (scopes.length > 0) {
options.scopes = scopes;
}
// This call will pop up a window to ask user for permission to grant
// permissions of the given OAuth2 scopes, or declared scopes in
// manifest.json as a fallback.
//
// For non-signed-in Chrome session, this will open up a window to ask the
// user to sign in to Chrome first.
PromiseWrap.getAuthToken(options).then(function(token) {
console.log('Authentication successful');
reply({token: token});
}, function(error) {
console.error('Authentication error', error); // line 94 is here :(
reply({error: error.message});
});
};
我按照以下步骤操作:
1- download zip from arc welder
2- upload to chrome webstore
3- get id + "crx_key" from chrome webstore
4- get chrome key from developer console associated with application
5- launch arc welder and add oauth key
6- add metadata "usePlayServices": ["gcm", "plus","location", "maps"],"crx_key":"<KEY FROM WEBSTORE>"
7- launch app - chose google account - get an oauth exception
我无法获取 logcat 数据,它的打印速度非常快以至于无法连接,哦,我正在 mac 上这样做。
编辑
似乎端点正在使用已弃用的范围
https://www.googleapis.com/auth/userinfo.email