Recommend resolution for the error: OPERATION_NOT_ALLOWED : The identity provider configuration is disabled

孤人 提交于 2020-01-30 11:25:09

问题


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.

here is the snippet of code:

//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"
      }
    ]
  }
}

Instead of a Successful Google Sign in from the console log, i get :

Storage access automatically granted for tracker “https://nompu-website.firebaseapp.com” on “http://127.0.0.1:5500”.

I have enabled Google as one of the sign in options.


回答1:


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.



来源:https://stackoverflow.com/questions/58064403/recommend-resolution-for-the-error-operation-not-allowed-the-identity-provide

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!