Last active
December 6, 2019 03:25
-
-
Save softauthor/c82e083eda8a385ee6981ee5cadc5685 to your computer and use it in GitHub Desktop.
JavaScript + Firebase: Get Logged In User Data [RTDB]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var email = "[email protected]" | |
var password = "pword1" | |
async function createNewAccount() { | |
try { | |
const user = await firebase.auth().createUserWithEmailAndPassword(email, password); | |
console.log(user.uid) | |
} catch (error) { | |
console.log(error.message) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment