建议针对该错误的解决方案:OPERATION_NOT_ALLOWED:身份提供程序配置已禁用 [英] Recommend resolution for the error: OPERATION_NOT_ALLOWED : The identity provider configuration is disabled
问题描述
有人可以为我在尝试Google宣誓的Firebase Web应用程序中遇到的问题推荐解决方案吗?
Can someone please recommend a resolution to the problem that I am facing in my firebase web application where I am trying out google oath.
这是代码段:
//login with google
const googleButton = document.querySelector('#googleLogin');
googleButton.addEventListener('click', (e)=>{
e.preventDefault();
M.Modal.getInstance(modal).close();
loginForm.reset();
const provider = new firebase.auth.GoogleAuthProvider();
auth.signInWithPopup(provider).then(function(result){
console.log(result);
console.log("Successful Google Sign in");
}).catch(function(error){
console.log(error);
console.log("Login failed");
这是我从浏览器获得的响应负载:
here is the response payload that I get from the browser:
{
"error": {
"code": 400,
"message": "OPERATION_NOT_ALLOWED : The identity provider configuration is disabled.",
"errors": [
{
"message": "OPERATION_NOT_ALLOWED : The identity provider configuration is disabled.",
"domain": "global",
"reason": "invalid"
}
]
}
}
我从控制台日志中得到的不是Successful Google Sign in
,而是:
Instead of a Successful Google Sign in
from the console log, i get :
为跟踪器" https://nompu-website.firebaseapp.com 自动授予存储访问权限在" http://127.0.0.1:5500 "上.
Storage access automatically granted for tracker "https://nompu-website.firebaseapp.com" on "http://127.0.0.1:5500".
我已启用Google作为登录选项之一.
I have enabled Google as one of the sign in options.
推荐答案
我重新启动了浏览器,重新运行了Web应用程序,再次从Firebase控制台启用了Google登录方法,最后添加了授权域( 127.0.0.0)类型为custom的授权域列表.奏效了.
I restarted the browser, re-ran the web-application , enabled the Google sign-in method from Firebase console (again) and finally added the authorized domain (127.0.0.0) of type custom to the list of authorized domains. It worked.
这篇关于建议针对该错误的解决方案:OPERATION_NOT_ALLOWED:身份提供程序配置已禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!