I have created new app on firebase and enabled Email/Password provider.
var firebase = require("firebase");
var config = {
apiKey: "===========",
authDomain: "========.firebaseapp.com",
databaseURL: "https://------.firebaseio.com",
storageBucket: "-------.appspot.com",
};
firebase.initializeApp(config);
firebase.auth().createUserWithEmailAndPassword("email","password").catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
// ...
});
but I am getting firebase.auth().createUserWithEmailAndPassword() is not a function. using in nodejs and firebasae 3 please tell me what I am doing wrong