使用google provider登录Nativescript应用程序时出现问题
我尝试使用google provider登录我的angular nativescript应用程序。我的web应用程序工作正常,因为手机将SHA-1添加到firebase控制台 我有两个问题:使用google provider登录Nativescript应用程序时出现问题,nativescript,nativescript-plugin,nativescript-firebase,Nativescript,Nativescript Plugin,Nativescript Firebase,我尝试使用google provider登录我的angular nativescript应用程序。我的web应用程序工作正常,因为手机将SHA-1添加到firebase控制台 我有两个问题: 尝试使用google提供程序firebaseWebApi.auth()登录后,未激发onAuthStateChanged(登录函数正确返回用户) 当无法使用google provider登录时,我尝试使用firebaseWebApi.auth()登录。使用EmailandPassword()登录,但我收到一
public async startLoginGoogle(): Promise<firebase.auth.UserCredential> {
const user = await firebase.login({
type: firebase.LoginType.GOOGLE
});
// user with getIdTokenResult() is available here
return user.getIdTokenResult();
}
firebaseWebApi.auth().onAuthStateChanged((user: firebase.User) => {
// nothing
subject.next(user);
});
public async startoginogole():Promise{
const user=wait firebase.login({
类型:firebase.LoginType.GOOGLE
});
//此处提供具有getIdTokenResult()的用户
返回user.getIdTokenResult();
}
firebaseWebApi.auth().onAuthStateChanged((用户:firebase.user)=>{
//没什么
subject.next(用户);
});
有什么想法吗?你的意思是,在取消谷歌登录页面的登录过程后,如果你直接尝试使用电子邮件/密码登录,那么它就不起作用了吗?好吧,重新启动应用程序后,它又可以了,但如果我在谷歌提供商登录失败后直接尝试使用电子邮件/密码登录,那就不行了。你能设置一个示例项目来演示吗这个问题。