working with email on create user / sign in -- not getting expected error from firebase

This commit is contained in:
Loewy
2024-02-08 12:32:20 -08:00
parent e2bde3bd01
commit baab800a1c
3 changed files with 43 additions and 14 deletions

View File

@@ -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