如何获得 google IdToken?
How can I get a google IdToken?
我正在使用这个插件:cordova-plugin-googleplus
在用户正确选择他的 Gmail
后,我得到一个包含很多不同用户信息的对象
在 后端 我使用 Java 并遵循了这个 教程: backend-auth
现在我遇到了一个问题,我只能通过 googleplus plugin
获得访问令牌,但我需要一个 IDToken。这是我使用的代码:
this.googlePlus.login({webclientId:'778525824123-83qa65tspdfd5c6i6roquf3dd41m3nk8.apps.googleusercontent.com'})
.then(res => {
console.log(res);
}
)
.catch(err => console.error(err));
可能是我的webclientId有问题?我不知道。
我没有使用npm版本解决了,我用的是:
ionic cordova插件添加https://github.com/EddyVerbruggen/cordova-plugin-googleplus ......
我正在使用这个插件:cordova-plugin-googleplus
在用户正确选择他的 Gmail
后,我得到一个包含很多不同用户信息的对象
在 后端 我使用 Java 并遵循了这个 教程: backend-auth
现在我遇到了一个问题,我只能通过 googleplus plugin
获得访问令牌,但我需要一个 IDToken。这是我使用的代码:
this.googlePlus.login({webclientId:'778525824123-83qa65tspdfd5c6i6roquf3dd41m3nk8.apps.googleusercontent.com'})
.then(res => {
console.log(res);
}
)
.catch(err => console.error(err));
可能是我的webclientId有问题?我不知道。
我没有使用npm版本解决了,我用的是:
ionic cordova插件添加https://github.com/EddyVerbruggen/cordova-plugin-googleplus ......