简体   繁体   English

Firebase 在 Playstore 上上传应用程序后电话身份验证不起作用

[英]Firebase phone authentication is not working after upload app on playstore

I have no idea why it is happening.我不知道为什么会这样。 My app works fine with debug apk and signed apk.我的应用程序适用于调试 apk 和签名的 apk。 I have added the SHA1 key to firebase console also.我也将 SHA1 密钥添加到 firebase 控制台。 But when i uploaded my app and installed it from Play Store then it is not sending the OTP to my phone number.但是当我上传我的应用程序并从 Play 商店安装它时,它不会将 OTP 发送到我的电话号码。 Please help!请帮忙!

Thanks in advance提前致谢

Did you just enrolled for Google Play App Signing ? 您刚刚注册Google Play App Signing吗? In that case your key has changed. 在这种情况下,您的密钥已更改。 You can get SHA1 of the key used to sign your apk from Play Store Console. 您可以从Play商店控制台获取用于签署apk的密钥的SHA1。

Use this steps you have successfully resolve all issues -: 使用此步骤您已成功解决所有问题 - :

  1. Go to google play console 转到谷歌播放控制台
  2. Release Management -> App Signing 发布管理 - >应用程序签名
  3. copy SHA-1 certificate fingerprint in (App signing certificate) but no include (SHA1: ) 在(应用程序签名证书)中复制SHA-1证书指纹但不包括(SHA1 :)
  4. Open Firebase console -> Project settings -> Add fingerprint 打开Firebase控制台 - >项目设置 - >添加指纹
  5. Paste your SHA-1 key 粘贴SHA-1密钥
  6. Now Reinstall your app from play 现在从Play重新安装您的应用程序

@HandyPawan's mentioned answer completely right here but as Google Console updated now the steps are - @HandyPawan 提到的答案完全就在这里,但随着 Google Console 现在更新,步骤是 -

  1. Go to google play console转到谷歌播放控制台
  2. Release -> Setup -> App Integrity发布 -> 设置 -> 应用完整性
  3. copy SHA-1 certificate fingerprint in (App signing certificate) but no include (SHA1: )在(应用签名证书)中复制 SHA-1 证书指纹,但不包括(SHA1:)
  4. Open Firebase console -> Project settings -> Add fingerprint打开 Firebase 控制台 -> 项目设置 -> 添加指纹
  5. Paste your SHA-1 key粘贴您的 SHA-1 密钥
  6. Now Reinstall your app from play现在重新安装您的应用程序

In my case, SHA-1 alone didn't work until I pasted my SHA-256.就我而言,在我粘贴 SHA-256 之前,单独的 SHA-1 不起作用。

复制SHA1密钥后,您是否在项目中下载了google-services.json

In my situation I uploaded to the Play Store signed with my existing SHAs, which have been set in my Firebase App fingerprints for a long time with SMS autocomplete working fine.在我的情况下,我上传到 Play 商店,使用我现有的 SHA 签名,这些 SHA 在我的 Firebase 应用指纹中设置了很长时间,短信自动完成工作正常。 I also see the same SHA keys listed in the Play Store for my app.我还看到 Play 商店中为我的应用列出了相同的 SHA 密钥。

However now the SMS outbound txt looks different and shows my package name with "(unverified)", and no 11 digit hash at the end as before.但是,现在 SMS 出站 txt 看起来不同,并显示我的包名称为“(未验证)”,并且没有像以前一样末尾的 11 位哈希。 Needless to say, the autocomplete is no longer working.不用说,自动完成不再起作用。

Can you confirm you are seeing the 11 char hash at the end of the SMS messages being received?您能否确认您在收到的 SMS 消息末尾看到了 11 个字符的哈希值? There have been reports that long package names, along with the "(unverified)" appended, may be causing the message to truncate, thereby removing the ending hash.有报告称,长包名以及附加的“(unverified)”可能会导致消息被截断,从而删除结尾的散列。

In which case once verified the package name will be replaced with the app name, the "(unverified)" removed, which should shorten the overall message to include the end hash again.在这种情况下,一旦验证包名称将替换为应用程序名称,删除“(未验证)”,这应该缩短整体消息以再次包含结束哈希。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM