doc: add loginwithEmailandPassword, then redirect the user back to homepage
This commit is contained in:
1 parent
b42fdbc0ca
commit
6e7a2637d8
1 file changed
+6
@@ -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) => {
|
||||||
|
|||||||
Reference in new issue
Block a user