Try to search your question here, if you can't find : Ask Any Question Now ?

Firebase console no new user created

HomeCategory: stackoverflowFirebase console no new user created
Avatarwillson asked 5 months ago

I am performing user Sign Up with Firebase. For this I am using the “createUserWithEmailAndPassword(email, password)” method to create a new user. Using Chrome DevTools, the debugging console, I find no errors. Still no new user is created in my console.

My HTML code for the elements is the following:

<section id="first_part_page">

        <form id="Subscribe_Form">

            <input class="input_box" id="email_input" type="text" placeholder="Email">
            <br>
            <input class="input_box" id="input_password" type="text" placeholder="Password">
            <br>
            <input class="main_button" type="submit" id="submit_form" value="Submit" onclick="subscribeFirebase()"> 
        </form>
    </section> 

I have included following scripts in my Page.

    <!-- TODO: Add SDKs for Firebase products that you want to use
      https://firebase.google.com/docs/web/setup#config-web-app -->
    <script src="https://www.gstatic.com/firebasejs/6.1.1/firebase-auth.js"></script>
    <script src="https://www.gstatic.com/firebasejs/6.1.1/firebase-firestore.js"></script>

    <script src="js/firebase_subscribe.js"></script>

In the last script, “js/firebase_subscribe.js”, I have included the following code:

//Your web app's Firebase configuration
var firebaseConfig = {
apiKey: "xxxxxx",
authDomain: "xxxxxx",
databaseURL: "xxxxxx",
projectId: "xxxxxx",
storageBucket: "xxxxxx",
messagingSenderId: "xxxxxx",
appId: "xxxxxx"
};

// Initialize Firebase
firebase.initializeApp(firebaseConfig);

//function that handles the subscribe process 
function subscribeFirebase(){

var user_Email = document.getElementById("email_input").value;
var user_Password = document.getElementById("input_password").value;

console.log(user_Email + user_Password);

//new user does not appear in firebase console 

firebase.auth().createUserWithEmailAndPassword(user_Email, user_Password).catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
console.log(errorMessage);
// ...
});    
}

I have no error messages, everything seems to work fine. Only nothing shows up in my console. So no new user is created. Any idea how this is possible?

1 Answers
Best Answer
AvatarFernando answered 5 months ago
Your Answer

1 + 15 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com