working with email on create user / sign in -- not getting expected error from firebase
This commit is contained in:
@@ -30,6 +30,20 @@ export const confirmCode = async (
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
export const createOrSignInUser = (email: string, password: string, isSignUp: boolean) => {
|
||||
console.log('isSignUp', isSignUp);
|
||||
try {
|
||||
if (isSignUp) {
|
||||
auth().createUserWithEmailAndPassword(email, password)
|
||||
} else {
|
||||
auth().signInWithEmailAndPassword(email, password)
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export const onAuthStateChanged = (
|
||||
// TODO: eslint not detecting ts?
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
|
Reference in New Issue
Block a user