The Android implementation of google_sign_in
.
This package is endorsed, which means you can simply use google_sign_in
normally. This package will be automatically included in your app when you do, so you do not need to add it to your pubspec.yaml
.
However, if you import
this package to use any of its APIs directly, you should add it to your pubspec.yaml
as usual.
To use Google Sign-In, you'll need to register your application, either using Firebase, or directly with Google Cloud Platform.
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.google-services.json
, you need to pass the client ID of the web application you registered as the serverClientId
when initializing the GoogleSignIn
instance.If you encounter APIException
errors, double-check that you have followed all of the registration steps in the instructions above.
You will also need to enable any OAuth APIs that you want, using the Google Cloud Platform API manager. For example, if you want to mimic the behavior of the Google Sign-In example app, you'll need to enable the Google People API.