Firebase Auth verification code error

hello,
i want to show a message using a snackbar to the user when he/she enters wrong OTP/verification code in the text box …i want it to triggger when a button called ‘SUBMIT OTP’ is clicked

What have you tried? Show your blocks.

1 Like

easy do one thing use if condition if otp = sent otp then pass the user else show an error
Is it okay?

i will show but first tell me are u able to understand what i want to say…i want to show user a message when login with otp fails…but the problem occuring is that…
i cant differentiately notify the user whether the verification code was incorrectly entered or there was a server problem…only what i am showing is “SOMETHING WENT WRONG”

i tried the provider tag in user login failed…but it shows “Phonenumber” when otp is entered wrong…
image

do u want to show only an error when firbase login failed

i want to show two separate and different errors for login failed due to some server problem and due to invalid otp entered

maybe any pro koder can solve your problem @Peter please help him

So if provider is a number you can show the snackbar. Is that what you mean?

i mot able to understand what did u say?
i just want to show user a message when he/she enters a wrong verification code.

no his mean is that he want to show two error when Otp entered if the otp is wrong then “otp wrong” or if otp is right but server problem then another error “server error please login after some time” @Peter

1 Like

exactly…u got my point

1 Like