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

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