doc: add loginwithEmailandPassword, then redirect the user back to homepage

This commit is contained in:
Leon Xu
2022-05-07 12:57:33 -07:00
parent b42fdbc0ca
commit 6e7a2637d8
+6
View File
@@ -10,6 +10,12 @@ function Login() {
const signIn = (e) => {
e.preventDefault();
auth
.signInWithEmailAndPassword(email, password)
.then((auth) => {
history.push("/");
})
.catch((error) => alert(error.message));
};
const register = (e) => {