React-native google signin gives Developer Error

后端 未结 8 1863
日久生厌
日久生厌 2021-02-02 17:53

I am trying Google login using React-native-google-signin plugin but it gives me a Developer_Error.I have done exctly same as mention in its document.here is my code ans steps.<

相关标签:
8条回答
  • 2021-02-02 18:44

    Add SHA1 key value to the google-services.json file. For that open the google-services.json file in any text editor and add

    "certificate_hash": "5e8f16062ea3cd2c4a0d547876baa6f38cabf625"

    with your hash value without a colon (:) in android_client_info

    Demo google-services.json file

    {
      "project_info": {
        "project_number": "108005055433",
        "firebase_url": "https://se-ai-camera.firebaseio.com",
        "project_id": "demo-app",
        "storage_bucket": "demo-app.appspot.com"
      },
      "client": [
        {
          "client_info": {
            "mobilesdk_app_id": "1:108005055433:android:323bf88853cd2899872618",
            "android_client_info": {
              "package_name": "com.myapp",
              "certificate_hash": "5e8f16062ea3cd2c4a0d547876baa6f38cabf625"
            }
          },
          "oauth_client": [
            {
              "client_id": "108005055433-q748qmcrn9a3j4qmg9srrkbotvr4emh1.apps.googleusercontent.com",
              "client_type": 3
            }
          ],
          "api_key": [
            {
              "current_key": "AIzaSyAuGCMQoW0tM7QMhpAgMIi0sK3vj0Nj8lk"
            }
          ],
          "services": {
            "appinvite_service": {
              "other_platform_oauth_client": [
                {
                  "client_id": "108005055433-q748qmcrn9a3j4qmg9srrkbotvr4emh1.apps.googleusercontent.com",
                  "client_type": 3
                }
              ]
            }
          }
        }
      ],
      "configuration_version": "1"
    }
    

    or add SHA1 key in the (firebase console) app settings and download the updated google-services.json file.

    Then change the GoogleSignIn.configure() method parameter as empty. This is the most important step.

    0 讨论(0)
  • 2021-02-02 18:47

    For those who are still looking for solutions:

    1. Please match your key fingerprint in firebase console.

    2. Do not initialize the configuration with keys, I repeat, do not provide any configuration object in the .configure() function Do this GoogleSignIn.configure().

    3. Point 2 will resolve the issue. :)

    0 讨论(0)
提交回复
热议问题