Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fix ApiException: 10 in Flutter for Android #188

Open
onmyway133 opened this issue Mar 24, 2019 · 2 comments
Open

How to fix ApiException: 10 in Flutter for Android #188

onmyway133 opened this issue Mar 24, 2019 · 2 comments

Comments

@onmyway133
Copy link
Owner

Get error com.google.android.gms.common.api.ApiException: 10 with google_sign_in package.

Read https://developers.google.com/android/guides/client-auth

Certain Google Play services (such as Google Sign-in and App Invites) require you to provide the SHA-1 of your signing certificate so we can create an OAuth2 client and API key for your app

console.developers.google.com/apis/credentials

Credentials -> OAuth client id
If we specify SHA1 in firebase, then console.developers.google.com will generate an Android oauth for us

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

Use correct keystore for debug and release

buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.release
        }
        debug {
            signingConfig signingConfigs.debug
        }
    }
@Fightlapa
Copy link

What if I'm also using backend and I use client id of my backed credentials which does not require any SHA-1 or anything?

@shredding
Copy link

If you run into problems in release mode albeit you've added your release sha1 to firebase, add the release key from play store as well:

https://play.google.com/console/developers/<your-company-id>/app/<your-app-id>/keymanagement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants