Helle all,
I want to start my web site with Firebase but I think I miss something. For my test I have juste one page.
var config = {
apiKey: "xxxxxxxxxxxxxxxxxxx",
authDomain: "xxxxxxxxx.firebaseapp.com",
databaseURL: "https://xxxxxxx.firebaseio.com",
projectId: "xxxxxx",
storageBucket: "xxxxxx.appspot.com",
messagingSenderId: "xxxxxxxxxxxx"
};
firebase.initializeApp(config);
firebase.auth().createUserWithEmailAndPassword(email, password).catch(function(error) {
var errorCode = error.code;
var errorMessage = error.message;
if (errorCode == 'auth/weak-password') {
alert('The password is too weak.');
} else {
alert(errorMessage);
}
console.log(error);
});
I have an error
Failed to load https://www.googleapis.com/identitytoolkit/v3/relyingparty/signupNewUser?key=AIzaSyCxa9cGDUAuR03RuCgPeyvNzsYVJ8xwXVU: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'xxxxxxxxxxxxxxxxxxxxxxx' is therefore not allowed access. The response had HTTP status code 404.
Do you have an idea ?
Ps : I am on an online IDE, codeanywhere
Thanks