Skip to content

[google_sign_in] Add more serverClientId info to README #9629

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/google_sign_in/google_sign_in_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 13 additions & 2 deletions packages/google_sign_in/google_sign_in_android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down