Skip to content

Instantly share code, notes, and snippets.

@reinaldorauch
Created September 25, 2017 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reinaldorauch/f0cc3107bdac42f4f1eba169e9bb7cb6 to your computer and use it in GitHub Desktop.
Save reinaldorauch/f0cc3107bdac42f4f1eba169e9bb7cb6 to your computer and use it in GitHub Desktop.
export const login = async ({ commit }, creds) => {
try {
const user = await firebase.auth().signInWithEmailAndPassword(creds.email, creds.password)
commit(types.AUTH_SET_USER, user.uid);
return {
"success": true,
"data": user
}
} catch (error) {
return {
"success": false,
"data": error
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment