如何使用Firebase电子邮件服务发送OTP验证代码?

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

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-2.html
匿名

发表评论

匿名网友

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

确定