我想用Firebase Auth验证这个电话号码,但是它给出了以下错误,
注:我的sha1和sha256键附后。当我手动将电话号码添加到消防基地时,它就能工作了。在iOS设备上工作平稳。
获取项目配置的GetAuthDomainTask错误。
{
"error":{
"code":400,
"message":"INVALID_CERT_HASH",
"errors":[
{
"message":"INVALID_CERT_HASH",
"domain":"global",
"reason":"invalid"
}
]
}
}
产出:
I/chatty (10469): uid=10134(com.xxx.xxx) identical 1 line
W/xxx.xxx(10469): Accessing hidden method Lsun/misc/Unsafe;-
>putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
W/System (10469): Ignoring header X-Firebase-Locale because its value
was null.
D/EGL_emulation(10469): eglMakeCurrent: 0x7a08b7442b80: ver 3 0 (tinfo
0x7a08b7299680)
E/FirebaseAuth(10469): [GetAuthDomainTask] Error getting project
config. Failed with {
E/FirebaseAuth(10469): "error": {
E/FirebaseAuth(10469): "code": 400,
E/FirebaseAuth(10469): "message": "INVALID_CERT_HASH",
E/FirebaseAuth(10469): "errors": [
E/FirebaseAuth(10469): {
E/FirebaseAuth(10469): "message": "INVALID_CERT_HASH",
E/FirebaseAuth(10469): "domain": "global",
E/FirebaseAuth(10469): "reason": "invalid"
E/FirebaseAuth(10469): }
E/FirebaseAuth(10469): ]
E/FirebaseAuth(10469): }
E/FirebaseAuth(10469): }
E/FirebaseAuth(10469): 400
E/zzf (10469): Failed to get reCAPTCHA token - calling backend
without app verification
D/EGL_emulation(10469): eglMakeCurrent: 0x7a08b7442b80: ver 3 0 (tinfo
0x7a08b7299680)
W/System (10469): Ignoring header X-Firebase-Locale because its value
was null.
E/FirebaseAuth(10469): [SmsRetrieverHelper] SMS verification code
request failed: unknown status code: 17093 null
I/flutter (10469): exception
I/flutter (10469): [firebase_auth/missing-client-identifier] This
request is missing a valid app identifier, meaning that neither
SafetyNet checks nor reCAPTCHA checks succeeded. Please try again, or
check the logcat for more details.
W/GoogleApiManager(10469): com.google.android.gms.internal.auth-api-
phone.zzv could not execute call because it requires feature
(sms_retrieve, 1).
W/GoogleApiAvailability(10469): GMS core API Availability.
ConnectionResult=2, tag=null
W/GoogleApiAvailability(10469): java.lang.IllegalArgumentException
发布于 2020-12-08 07:20:12
我也有同样的错误,因为我通过vscode终端生成了我的sha1证书,如果您想要电话,这是很糟糕的。所以我修正了
.android/app/build.gradle
android>task>signReport
如果不起作用,那就检查一下
发布于 2020-12-14 12:40:10
将下面的依赖项添加到build.gradle文件中
实现'androidx.browser:browser:1.3.0‘
发布于 2021-02-01 05:14:13
检查app/build.gradle包含以下调试和发布代码
signingConfigs {
debug {
keyAlias keystoreDevProperties['keyAlias']
keyPassword keystoreDevProperties['keyPassword']
storeFile keystoreDevProperties['storeFile'] ? file(keystoreDevProperties['storeFile']) : null
storePassword keystoreDevProperties['storePassword']
}
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
minifyEnabled true
shrinkResources true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
signingConfig signingConfigs.release
minifyEnabled true
shrinkResources true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
https://stackoverflow.com/questions/65141094
复制相似问题