Firebase Google身份验证未登录用户。大约3周前,它突然停止了播放。几周前,相同的代码仍在工作...什么都没改变。我没有收到任何控制台日志错误,当登录开始时,它就位于主屏幕上,就像从未按下按钮一样。
async googleLogin(): Promise<void> {
try {
const gplusUser = await this.gplus.login({
'webClientId': environment.googleWebClientId,
'offline': true,
'scopes': 'profile email'
});
return await this.afAuth.auth.signInAndRetrieveDataWithCredential(
firebase.auth.GoogleAuthProvider.credential(gplusUser.idToken)
).then((credential) => {
const user: IUser = {
uid: credential.user.uid,
email: credential.user.email,
displayName: credential.user.displayName,
};
this.updateUserData(user);
});
} catch (err) {
console.log(err);
}
}