English 中文(简体)
越狱 消防局电话
原标题:Error while geting Firebase Phone Auth OTP

我正试图实施消防基地电话核查。 我得以在火力底线上进行电话核查。 我已造就了钥匙店,并将SHA的签名添加到圣殿。

dependencies:

dependencies {
    def multidex_version = "2.0.1"
    implementation platform( com.google.firebase:firebase-bom:26.0.0 )
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation  com.google.firebase:firebase-analytics 
    implementation "androidx.multidex:multidex:$multidex_version"
    implementation  com.google.firebase:firebase-auth 
    implementation  com.google.firebase:firebase-core 
    implementation  com.google.firebase:firebase-analytics 
    implementation  com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava 

}

Telephone_verification.dart

                await FirebaseAuth.instance.verifyPhoneNumber(
                  phoneNumber:  +1234567890 ,

                  verificationCompleted: (PhoneAuthCredential credential) {
                    print( verificationCompleted );
                    
                  },
                  verificationFailed: (FirebaseAuthException e) {
                    print( verificationFailed );
                    if (e.code ==  invalid-phone-number ) {
                      print( The provided phone number is not valid. );
                    }
                    else {
                      print( Some error occoured: $e );
                    }
                  },
                  codeSent: (String verificationId, int resendToken) async {
                    print( codeSent );

                    // Update the UI - wait for the user to enter the SMS code
                    String smsCode =  123456 ;

                    // Create a PhoneAuthCredential with the code
                    PhoneAuthCredential phoneAuthCredential = PhoneAuthProvider.credential(verificationId: verificationId, smsCode: smsCode);
                  
                  },
                  timeout: const Duration(seconds: 60),
                  codeAutoRetrievalTimeout: (String verificationId) {
                    print("Timeout: $verificationId");
                  },
                );

When the above block is executed following error is received. Console Output:

E/FirebaseAuth: [GetAuthDomainTask] Error getting project config. Failed with {
      "error": {
        "code": 400,
        "message": "INVALID_CERT_HASH",
        "errors": [
          {
            "message": "INVALID_CERT_HASH",
            "domain": "global",
            "reason": "invalid"
          }
        ]
      }
    }
     400
V/FA: Recording user engagement, ms: 1165
E/zza: Failed to get reCAPTCHA token - calling backend without app verification
问题回答

这个问题与SHA1和SHA256钥匙有关。 你必须补充这些内容,以验证你的故事。

Goto

  • Firebase Console of your project
  • Authentication
  • Project Setting (From Setting button near Project Overview)
  • Add fingerprint
  • Add SHA-1 and SHA-256 values of your keystore.

你们可以从梯度中获取关键遗产。

页: 1

https://firebase.google.com

超过400项是坏申请,原因如下:

  1. Check if phone authentication option is enabled in firebase console or not. Enable it.
  2. Check if Android Device Check API is enabled in Google cloud console or not. Enable it.
  3. Check if SHA-1 and SHA-256 are added to your firebase project or not. Add it as follows:

1. 开放你在消防基地内的项目——和; 进入项目设计——和; 添加 f(页底)的Clicks->

https://i.stack.imgur.com/peF8P.jpg” alt=“Image for reference”/>

您可以取得您和海底演播室项目的SHA值如下:

Click on gradle on top right side -> task -> android -> signingReport -> Get the SHA values at the bottom after running signingReort Image for reference

Follow the documentation 如果问题得不到解决。

Enable Phone Options in the firebase Console under Authentication

我在这里被困了一个星期,只找一个关键人物,我使用的钥匙只限于另一个人,因此在试图用我的手里时未能使用。 因此,我首先删除了在安乐器核查中标语的限制,一切都回过正常。

I m checking back to this thread and the mentioned issue, since today I had the same error coming from a Flutter Android application while debugging on my physical device. Since the solution is the same, because the output is the same kind of Android application and they rely on the same foundation, I wanted to share my solution.

在审视这一read光并阅读所有先前的答复之后,我理解,为了解决来自消防基地的400个INVALID_CERT_HASH的答案,还有两个步骤要走下去,而以前的答案是好的方面,但不是完整的(或至少不是更完整的)。

第一步是像以前的答复那样,制作256个 SH。 考试(视窗)

gradlew signingReport

你们可以产生。

The second step is to allow calls from your app to your firebase project, and the app must be verified on Play Integrity for that. You have to open your Firebase project to find the App Check feature on the left sidebar, then select the App tab (the URL is https://console.firebase.google.com/project/<project_name>/appcheck/apps).There you can register you app for Play Integrity (choose freely the ttl of the token Firebase generates) so that you don t need to integrate it into your app but you can basically tell Google that your app is safe.

Click on the Register button corresponding to your Android application and choose App Integrity (the latter is deprecated). If you already added the SHA fingerprints, the corresponding field will be autofilled, else paste the SHA-256 fingerprint. Confirm the terms of service if required and save, and you re good to go. More information is included here.

These are all the steps I followed and that solved my issue. Hope this answer can help people that are starting using Android with Firebase in 2024.

“Image

页: 1 释放方式:

keytool -list -v -keystore {keystore_name} -alias {alias_name}

SHA-1 键盘tore证书





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签