iOS 和 Android 中的 Firebase OTP 身份验证消息不同

Firebase OTP Auth messages are differing in iOS and Android

我在 iOS 和 Android 中为我的应用程序使用 Firebase Phone Auth。当我收到 OTP 消息时,我注意到 iOS 和 Android 上收到的消息有所不同。

iOS OTP 消息读取xxxxxx is your verification code for myAppName.firebaseapp.com.(授权域名)。

而 Android OTP 消息读取 xxxxxx is your verification code.

Authentication 部分和 Templates 选项卡下的 firebase 控制台中,选择 SMS 会显示一个不同的模板。 %LOGIN_CODE% is your verification code for %APP_NAME%.

我需要在 iOS 和 Android 中将 OTP 消息显示为 xxxxxx is your verification code for My App Name.

我也在项目设置中更改了项目名称和 Public-facing 名称。但是消息没有变化。

这是一个错误还是我遗漏了什么?

firebaser 在这里

您无法更改为 OTP 发送的消息。参见:

  • How to change the sms verification template in firebase phone auth

如果您认为差异是错误,您可以file a bug report

我已将错误报告提交给支持团队,并得到了他们的回复。邮件回复如下

“您的应用是否还在开发阶段,还没有在AppStore/PlayStore上架?如果是这样,验证码中没有应用名称的行为正在按预期工作。它只会有一个应用名称在您的应用程序发布到 App/Play 商店后。如果它已发布 Android / iOS 应用程序,那么我们在短信中确实有应用程序名称,我们从 AppStore / PlayStore(和 Web 的网站域)。

只是一个附加信息,应用发布后 APP_NAME 可能会延迟出现。由于 AppStore/PlayStore 更新与我们的服务器获取更改之间的传播,更新可能会延迟。"

由于我的应用程序处于开发阶段,我无法在 OTP 消息中获取应用程序名称。一旦应用程序发布到应用程序商店和 Play 商店,这将得到解决。

除了@Kautham Krishna 的回答,对于iOS,还需要添加App ID & Team ID 到 firebase 控制台中的应用程序设置。