【发布时间】:2019-03-03 23:06:41
【问题描述】:
我正在以这种方式进行 Google OAuth 登录:
let instance = gapi.auth2.getAuthInstance();
instance.signIn({
scope: 'profile email https://www.googleapis.com/auth/plus.me'
}).then((user) => {
this.makeGoogleLogin(user.getAuthResponse().id_token);
});
我只想获取姓名、电子邮件和性别。
此代码有效,但由于 Google+ API 于 3 月 7 日关闭,我不知道如何检索用户名。 我查看了 Google API 但找不到。
您知道如何从 Google 检索用户名吗?
【问题讨论】:
标签: javascript google-api