为什么 "Confirm your choices" 使用 cordova google-plus 插件弹出两次?
Why "Confirm your choices" pops up twice using cordova google-plus plugin?
let params;
if(this.platform.is('android')){
params = {
'webClientId': '77852...client id stuff..',
'offline': true
}
}
else{
params={}
}
this.googlePlus.login(params)
.then(res => {
console.log(res);
}
)
.catch(err => console.error(err));
这是我正在使用的全部代码,如果我调用这段代码会发生以下情况:
首先我必须决定我要使用哪个 google 帐户,接下来它会要求我确认我的选择并按允许,在我按下按钮后,相同的菜单再次弹出并且只有在第二个 "allow" 单击我获得了 iDToken。
为什么同一个菜单弹出两次内容相同?
GooglePlus 插件的 github 页面上有 post =>
https://github.com/EddyVerbruggen/cordova-plugin-googleplus/issues/675
如果您只是用于登录(不需要任何 serverAuthCode)然后传递 'offline': false
let params;
if(this.platform.is('android')){
params = {
'webClientId': '77852...client id stuff..',
'offline': false
}
}
else{
params={}
}
this.googlePlus.login(params)
.then(res => {
console.log(res); } ) .catch(err => console.error(err));
let params;
if(this.platform.is('android')){
params = {
'webClientId': '77852...client id stuff..',
'offline': true
}
}
else{
params={}
}
this.googlePlus.login(params)
.then(res => {
console.log(res);
}
)
.catch(err => console.error(err));
这是我正在使用的全部代码,如果我调用这段代码会发生以下情况:
首先我必须决定我要使用哪个 google 帐户,接下来它会要求我确认我的选择并按允许,在我按下按钮后,相同的菜单再次弹出并且只有在第二个 "allow" 单击我获得了 iDToken。
为什么同一个菜单弹出两次内容相同?
GooglePlus 插件的 github 页面上有 post => https://github.com/EddyVerbruggen/cordova-plugin-googleplus/issues/675
如果您只是用于登录(不需要任何 serverAuthCode)然后传递 'offline': false
let params; if(this.platform.is('android')){ params = { 'webClientId': '77852...client id stuff..', 'offline': false } } else{ params={} }
this.googlePlus.login(params) .then(res => { console.log(res); } ) .catch(err => console.error(err));