Basir Alam
Basir Alam

Reputation: 1358

How can I send OTP(One Time Password) from Firebase

I am new to Firebase and I am working on an iOS project in which I want to send OTP(One Time Password) to the email id given by a user.

Can I use below method to include any OTP? Or is there any method/way in firebase so that I can send an email with custom email body. Note: I am not using any web service.

-(void)sendEmailVerificationWithCompletion:
(nullable FIRSendEmailVerificationCallback)completion
{

}

Upvotes: 1

Views: 3814

Answers (2)

Abhishek Mitra
Abhishek Mitra

Reputation: 3395

Through Firebase it is not possible except custom firebase authentication token mentioned above by Frank. Perhaps you should use your own database and from there you can send the OTP.

Upvotes: 2

Frank van Puffelen
Frank van Puffelen

Reputation: 599876

There is currently no way to change the message that is sent for an email verification or password reset request.

Firebase Authentication has no built-in support for one-time passwords or two-factor authentication. If you need those for your project, you can implement that with another provider and then mint a custom Firebase Authentication token for the user. You will need a server for that though, as minting this token requires use of your account credentials.

Upvotes: 2

Related Questions