diff --git a/packages/google_sign_in/google_sign_in_android/CHANGELOG.md b/packages/google_sign_in/google_sign_in_android/CHANGELOG.md index fa5c921d345..7a6917bc038 100644 --- a/packages/google_sign_in/google_sign_in_android/CHANGELOG.md +++ b/packages/google_sign_in/google_sign_in_android/CHANGELOG.md @@ -1,3 +1,8 @@ +## 7.0.3 + +* Add more details and troubleshooting for `serverClientId` configuration + via Firebase. + ## 7.0.2 * Adds a README note about potentially confusing error returns from diff --git a/packages/google_sign_in/google_sign_in_android/README.md b/packages/google_sign_in/google_sign_in_android/README.md index 51759177dad..dec0aaa10c2 100644 --- a/packages/google_sign_in/google_sign_in_android/README.md +++ b/packages/google_sign_in/google_sign_in_android/README.md @@ -22,7 +22,8 @@ To use Google Sign-In, you'll need to register your application, either * If you are use the `google-services.json` file and Gradle-based registration system, no identifiers need to be provided in Dart when initializing the - `GoogleSignIn` instance when running on Android. + `GoogleSignIn` instance when running on Android, as long as your + `google-services.json` contains a web OAuth client entry. * If you are not using `google-services.json`, you need to pass the client ID of the *web* application you registered as the `serverClientId` when initializing the `GoogleSignIn` instance. @@ -51,6 +52,16 @@ errors include: * Sign-in working in one build configuration but not another. Common sources of configuration errors include: -* Missing or incorrect `serverClientId`. * Missing or incorrect signing SHA for one or more build configurations. * Incorrect Android package name on the server side. +* Missing or incorrect `serverClientId`. + +If you are using `google-services.json` and recieve a "serverClientId must be +provided on Android" error message, check that: + * Your `google-services.json` contains a web OAuth client, which should be an + `oauth_client` entry with `client_type: 3`. This should have been created + automatically when enabling Google Sign In using the Firebase console, but + if not (or if it was later removed), add a web app to the project and then + re-download `google-services.json`. + * You correctly followed all of the Gradle configuration steps in the Firebase + integration documentation. diff --git a/packages/google_sign_in/google_sign_in_android/pubspec.yaml b/packages/google_sign_in/google_sign_in_android/pubspec.yaml index dcb635d2a01..0628fad0ee2 100644 --- a/packages/google_sign_in/google_sign_in_android/pubspec.yaml +++ b/packages/google_sign_in/google_sign_in_android/pubspec.yaml @@ -2,7 +2,7 @@ name: google_sign_in_android description: Android implementation of the google_sign_in plugin. repository: https://github.com/flutter/packages/tree/main/packages/google_sign_in/google_sign_in_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_sign_in%22 -version: 7.0.2 +version: 7.0.3 environment: sdk: ^3.6.0