skip to Main Content

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

I have a flutter app that has ci/cd & Google sign in which fails because of SHA1 change Because of the change of the machine that builds the apk in debug mode so how to make the google sign in work on the ci/cd apk or How to add the ci/cd machine SHA1 to firebase to. make the google sign in work?

2

Answers


  1. Chosen as BEST ANSWER
    1. generate keystore like this answer here

    2. open the keystore with keystore explorer here

    3. copy SHA1 & add it to firebase android app enter image description here

    4. add the keystore to code magic enter image description here


  2. You should create a separate signing key for the debug build type or copy the existing one which was created by your development machine.

    Copy the debug signing key into your project folder and configure it in gradle.

    Example: Create a signing key namend debug.keystore with the alias androiddebugkey and password android. Then create a folder named keystore in your android project directory and copy the keystore into it. You can assign a debug signing key in the app module’s build.gradle file like this:

    signingConfigs {
            debug {
                keyAlias 'androiddebugkey'
                keyPassword 'android'
                storeFile file('.././keystore/debug.keystore')
                storePassword 'android'
            }
            release {
                ...
            }
        }
    

    This way all developers and the CI/CD systems use the same debug signign key.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search