How to send OTP verification code using Firebase email service?

huangapple go评论74阅读模式
英文:

How to send OTP verification code using Firebase email service?

问题

我想使用Firebase提供的服务来管理我的应用程序中的账户。根据要求,需要向电子邮件发送验证码,可以是Google账户或电子邮件和密码。我知道可以将此验证码发送到手机上,但是否可以将此验证码发送到电子邮件,并将其用作验证的一种方式,而不是使用Firebase提供的链接?

英文:

I want to use the services provided by Firebase to manage the accounts in my app. Due to the requirements, it is necessary to send a verification code to the email, either Google or email and password. I know it is possible to send this code to a phone, but is it possible to send this code to email and use it as a form of verification instead of using the link provided by Firebase?

答案1

得分: 1

我理解你想要实现的是使用与短信不同的提供商进行多因素身份验证。不幸的是,Firebase目前仍在添加除短信以外的更多第二因素的支持,因此目前不支持电子邮件。

然而,最近Firebase添加了对TOTP的支持,这使您可以使用类似Google Authenticator的身份验证器:https://firebase.google.com/docs/auth/web/totp-mfa

英文:

I assume that what you're trying to achieve is a Multi Factor Authentication with a different provider than SMS. Unfortunately, Firebase is still in the process of adding support for more second factors than just SMS, thus email is not currently supported.

However, recently Firebase added support for TOTP, which let's you use authenticators like Google Authenticator: https://firebase.google.com/docs/auth/web/totp-mfa

huangapple
  • 本文由 发表于 2023年8月9日 12:52:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76864675.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定