Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $registerButton.click(function() {
- var email = $emailInput.val();
- var password = $passInput.val();
- ref.createUser({
- email: email,
- password: password
- },
- function(error, userData) {
- if (error) {
- switch (error.code) {
- case "EMAIL_TAKEN":
- console.log("The new user account cannot be created because the email is already in use.");
- break;
- case "INVALID_EMAIL":
- console.log("The specified email is not a valid email.");
- break;
- default:
- console.log("Error creating user:", error);
- }
- } else {
- // Email en password: worden meegegeven als objecten
- login({email:email,password: password});
- console.log("Successfully created user account with uid:", userData.uid);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement