Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular firebase身份验证/未经授权的域错误,尽管我已授权该域_Angular_Firebase_Firebase Authentication - Fatal编程技术网

Angular firebase身份验证/未经授权的域错误,尽管我已授权该域

Angular firebase身份验证/未经授权的域错误,尽管我已授权该域,angular,firebase,firebase-authentication,Angular,Firebase,Firebase Authentication,我尝试设置Firebase身份验证,在localhost上也起到了作用。但是在Firebase上获得应用程序后,我得到了错误auth/unauthorized domain 我已经在Firebase中查看过了,该域已被列入白名单 使用Google登录firebase的我的代码: const provider = new auth.GoogleAuthProvider(); await this.afAuth.auth.signInWithPopup(provider) .then

我尝试设置Firebase身份验证,在localhost上也起到了作用。但是在Firebase上获得应用程序后,我得到了错误
auth/unauthorized domain

我已经在Firebase中查看过了,该域已被列入白名单

使用Google登录firebase的我的代码:

const provider = new auth.GoogleAuthProvider();
    await this.afAuth.auth.signInWithPopup(provider)
    .then ( credential => {
      return this.updateUserData(credential.user);
    })
private updateUserData(用户){
const userRef:AngularFirestoreDocument=this.afs.doc(`users/${user.uid}`);
常数数据={
uid:user.uid,
电子邮件:user.email,
displayName:user.displayName,
photoURL:user.photoURL
};
返回userRef.set(数据,{merge:true});
}
以下是完整的错误消息:

code: "auth/unauthorized-domain"
message: "This domain (nutrimap-c4d12.web.app) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -

您的域nutrimap-c4d12.web.app似乎未添加到firebase OAuth重定向域。您需要通过转到控制台Auth选项卡上的SETUP SIGN-in METHOD,确保其域已经存在于OAuth重定向域中。

不,域已经添加到那里。在“授权域”下,如果您认为您已正确完成了所有操作,但未按预期方式工作,请直接联系Firebase支持以获得故障排除帮助。谢谢你的提示,我试试看。