1
votes

I Used firebase authentication Sign in a user with an email address and password. I also enable email/password & i used firebase hosting.

It show

Error code >> auth/app-not-authorized

Massage >> This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.

   firebase.auth().signInWithEmailAndPassword($('#username').val(),                  $('#password').val())
            .then(                     
            )
            .catch(function (error) {
                var errorCode = error.code;
                var errorMessage = error.message;            
        console.log(">>>"+errorCode+">>"+errorMessage);                 
            });
2
you using domains ? firebase hosting ?aofdev
Review your key configuration in the Google API console The message is loud and clear!Sudhansu Choudhary

2 Answers

2
votes

You must have added key restrictions on your browser API key. You need to go to the Google Cloud console and remove those restrictions.

0
votes

https://console.cloud.google.com/apis/credentials/oauthclient/

Go to OAuth 2.0 client IDs > Web client (auto created by Google Service)

and add your full domain name

add with www and without www

-- www.yourdomanin.com

-- yourdomanin.com

enter image description here