Senith Umesha
Senith Umesha

Reputation: 164

Email OTP verification with firebase authentication in Flutter

By default firebase's sending a link to verify the user email, but I want to send a otp with that email. So is there a way to customize that email or send a otp and then once the user entered the correct code on the app get Firebase to mark that user account to email verified?

Upvotes: 2

Views: 2434

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 598728

What you're describing is quite literally what the default Firebase flow does: it send an email with a link that includes a OTP to verify the email address.

You can do a certain amount of customization of the email action handler page that the emails link to. If that is not enough, you will have to implement your own flow, and can then use the Admin SDK in a secure environment to mark the user's email as verified.

Upvotes: 4

Related Questions