尝试使用本机谷歌登录进行登录时出错

问题描述 投票:0回答:3

我正在使用React-native-google-sigin包。我按照说明在Firebase.io中注册了应用程序,使用keytools创建了SHA256密钥并添加到firebase并启用了Google登录。添加了google-services.json到android / app目录。

每次我尝试登录时,都会抛出此错误,请帮忙:

Error: A non-recoverable sign in failure occurred
at createErrorFromErrorData (NativeModules.js:146)
at NativeModules.js:95
at MessageQueue.__invokeCallback (MessageQueue.js:397)
at MessageQueue.js:127
at MessageQueue.__guard (MessageQueue.js:297)
at MessageQueue.invokeCallbackAndReturnFlushedQueue (MessageQueue.js:126)
at debuggerWorker.js:72 
firebase react-native firebase-authentication google-authentication
3个回答
0
投票

即使我有同样的错误,我花了一整天才解决它。这是因为SHA -1证书问题。我从firebase中的不同密钥库中提供了值,因此google-services.json有一些错误的客户端ID,这使得请求失败,所以我做了以下步骤。 1)从firebase中删除SHA-1密钥2)生成密钥(参考本文 - > [https://developers.google.com/android/guides/client-auth])3)将密钥放在fire base中并生成新的google -services.json文件

总是使用: - keytool -exportcert -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore 命令甚至不更改路径(在Windows中)默认密码:-android


0
投票

在您的仿真器或设备上,单击右侧的3个点,然后单击Google Play并更新版本。

打开Google Playstore在您的设备上搜索Google Play Services,更新它。立即运行您的应用程序


0
投票

修复步骤:

  1. 转到console.developer.google.com
  2. 选择项目。
  3. 转到凭据。
  4. 切换到O Auth Consent屏幕。
  5. 更改应用名称并填写电子邮件ID(可选)
  6. 保存在底部

尝试现在登录,它应该工作。

© www.soinside.com 2019 - 2024. All rights reserved.