BREAKING CHANGES: Converted to use Redux stores. Login now working using Redux.
This commit is contained in:
@@ -38,6 +38,14 @@ export const firestore = firebase.firestore();
|
||||
|
||||
const provider = new firebase.auth.GoogleAuthProvider();
|
||||
provider.setCustomParameters({ prompt: "select_account" });
|
||||
export const signInWithGoogle = () => auth.signInWithPopup(provider);
|
||||
|
||||
export default firebase;
|
||||
|
||||
export const getCurrentUser = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const unsubscribe = auth.onAuthStateChanged(userAuth => {
|
||||
unsubscribe();
|
||||
resolve(userAuth);
|
||||
}, reject);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user