I am developing a chrome extension which would require login before using that extension any further. I am using Firebase Authentication service to authenticate user to my extension. But something is not working out here.
A user will enter email and password that will use firebase to authorize. I am using it like this.
firebase.auth().signInWithEmailAndPassword(email, password).catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
console.log(error);
// ...
});
Everything is working fine but when I try to invoke sign in it return some error in background page.
code:"auth/internal-error"
message: "{"error":{"errors":
[{"domain":"usageLimits","reason":"keyExpired","message":"Bad
Request"}],"code":400,"message":"Bad Request"}}"
Also this :
www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=AIzaSyCI3pO1QSw_ciZy_Wd0CePyTlFwbUZV340 Failed to load resource: the server responded with a status of 400 ()
Here is my firebase config:
var firebase_config = {
apiKey: "<api-key>",
authDomain: "<domain>",
databaseURL: "<db-url>",
projectId: "<project-id>",
storageBucket: "example.appspot.com",
messagingSenderId: "5111111111"
};
firebase.initializeApp(firebase_config);
I am invoking all the firebase related functions inside background.js page. Don't what is not working out here. Please let me know if I am making anything wrong here.