简体   繁体   English

Flutter:Firebase:PlatformException(sign_in_failed,com.google.android.gms.common.api.ApiException:10:,null)

[英]Flutter: Firebase: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)

I am getting this exception when I sign in using google. 使用Google登录时出现此异常。 This exception only comes after the apk is uploaded for internal app sharing. 仅在上载apk进行内部应用共享后才出现此异常。 If we manually download this apk then every thing works perfectly fine. 如果我们手动下载此apk,则一切正常。 This works in debug but not in release. 这适用于调试,但不适用于发行版。

I have tried the below: 我尝试了以下方法:

  1. Settings in firebase console: SHA-1 fingerprint (debug) SHA-256 fingerprint (debug) SHA-1 fingerprint (release) SHA-256 fingerprint (release) firebase控制台中的设置:SHA-1指纹(调试)SHA-256指纹(调试)SHA-1指纹(发布)SHA-256指纹(发布)
  2. replaced the old google-services.json with the updated one 将旧的google-services.json替换为更新的
  3. Also filled all the required details in the given URL: https://console.developers.google.com/apis/credentials/consent and it is in review state. 还要在给定的URL中填写所有必需的详细信息: https//console.developers.google.com/apis/credentials/consent ,它处于审核状态。
    1. Also I have set the support email in firebase 我也在firebase中设置了支持电子邮件

Below gradle code 在gradle代码下面

signingConfigs {
    release {

            keyAlias 'key'
            keyPassword 'pass'
            storePassword 'pass'
            storeFile file('/Users/xyz/file.keystore')

    }
}
buildTypes {
    release {
        signingConfig signingConfigs.release
        minifyEnabled true
        useProguard true

        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    debug {
        signingConfig signingConfigs.debug
    }
}
dependencies {
 ...

implementation 'com.google.firebase:firebase-auth:19.0.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'

}

apply plugin: 'com.google.gms.google-services'

Expected: Successful sign in using google. 预期:使用Google成功登录。 Actual result: Getting exception:PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null) 实际结果: Getting exception:PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)

For the Google signing in your internal shared link you firstly need to add your internal App Sharing SHA-1 Key to your Firebase console. 要让Google登录您的内部共享链接,您首先需要将内部“应用共享SHA-1”密钥添加到Firebase控制台。

Steps are as below. 步骤如下。 (1) upload your application to google console for internal app sharing. (1)将您的应用程序上传到Google控制台以进行内部应用程序共享。 (2) Go to the App certificates of the internal app sharing. (2)转到内部应用共享的应用证书。 (3) Copy the SHA-1 Certificate key. (3)复制SHA-1证书密钥。 (4) Add This SHA-1 Certificate key to your Firebase Console. (4)将此SHA-1证书密钥添加到Firebase控制台。 (5) Save the changes on Firebase Console. (5)将更改保存在Firebase控制台上。

And For releasing Application with Google Sign_in feature Follow Below Steps. 对于使用Google Sign_in功能发布应用程序,请遵循以下步骤。 (1) upload your application to google console on release rab. (1)在rab版上将您的应用程序上传到Google控制台。 (2) Go to App signin tab and copy the SHA-1 certificate key. (2)转到“应用程序登录”选项卡,然后复制SHA-1证书密钥。 (3) Add SHA-1 certificate key to your Firebase Console. (3)将SHA-1证书密钥添加到Firebase控制台。 (4) Save the changes on Firebase Console. (4)将更改保存在Firebase控制台上。

暂无
暂无

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

相关问题 PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null) - PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null) Flutter:使用 google_sign_in 时出现 PlatformException(sign_in_failed,com.google.android.gms.common.api.ApiException:10:,null) - Flutter : PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null) when using google_sign_in PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10:, null, null) 尝试在 flutter 中使用 googleSignIn 时 - PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null) When trying to use googleSignIn in flutter 未处理的异常:PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 12500: , null) - Unhandled Exception: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 12500: , null) PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null) Getting this error While Sign in with Google Play - PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null) Getting this error While Sign in with Google Play Unhandled Exception: PlatformException (sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null) - works well in one system - Unhandled Exception: PlatformException (sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null) - works well in one system 谷歌登录失败 com.google.android.gms.common.api.ApiException: 10: - Google sign in failed com.google.android.gms.common.api.ApiException: 10: com.google.android.gms.common.api.ApiException: 10 - com.google.android.gms.common.api.ApiException: 10 com.google.android.gms.common.api.ApiException: 10: - com.google.android.gms.common.api.ApiException: 10: com.google.android.gms.common.api.ApiException:12500,在Google的Android Firebase项目中登录 - com.google.android.gms.common.api.ApiException: 12500, in android firebase project in google sign in
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM