Suppose the user wanted to sign up or sign in to the account. However, the Firebase error appears like this. How can I display the toast notification to the user using try-catch statement with typescript?
[FirebaseError: Firebase: Error (auth/email-already-in-use).]
Here is the code I tried:
try {
const credential = await signUpWithEmail(data.email, data.password);
if (credential.uid) {
toast.show({
title: 'Account created!