Created
February 7, 2017 19:56
-
-
Save pfulop/0a1f111707be62dbecff0c1732c92c14 to your computer and use it in GitHub Desktop.
This file contains 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
export function loginWithEmail(email, password){ | |
return (dispatch,_,firebaseApp)=>{ | |
dispatch({ type: LOGGING_IN}); | |
firebaseApp.auth().signInWithEmailAndPassword(email, password) | |
.then((user) => { | |
dispatch({ type: LOGGED_IN, user }); | |
}) | |
.catch(err => dispatch({ type: ERROR, error: err.toString() })); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment