google_sign_in
7.2.0, released a year ago by flutter.dev
Official Flutter plugin for authenticating users and requesting OAuth scopes via Google Sign-In.
What it does
Allows Flutter apps to authenticate users using their Google accounts across Android, iOS, macOS, and Web. Handles lightweight sign-in, explicit authentication UI flows, and separate OAuth authorization for Google APIs. Provides access tokens and server auth codes for backend verification.
AI-written summary of version 7.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- Your application needs to allow users to sign in with their Google account.
- You need OAuth access tokens or server auth codes to call Google APIs on behalf of the user.
Skip it when
- You only need local device biometrics or PIN authentication without Google accounts.
- You are targeting Windows or Linux desktop platforms where this plugin is not supported.
Strengths
- Official Flutter plugin supporting Android, iOS, macOS, and Web.
- Decouples basic authentication from authorization, matching modern OAuth security standards.
- Supports lightweight silent sign-in and streaming authentication state events.
Weaknesses
- Requires platform-specific setup and integration steps for each target OS.
- Web platform has specific constraints, such as mandatory SDK-rendered buttons and non-refreshing access tokens.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 4
Requires client ID configuration and separate native setup across Android, iOS/macOS, and Web.
final GoogleSignIn signIn = GoogleSignIn.instance;
await signIn.initialize(clientId: clientId, serverClientId: serverClientId);
signIn.authenticationEvents.listen((event) {
// Handle auth event
});
await signIn.attemptLightweightAuthentication();
if (signIn.supportsAuthenticate()) {
await signIn.authenticate();
}Alternatives
Packages that do the same job and could replace google_sign_in.
- firebase_auth
Pick if you want a complete identity platform supporting multiple providers (email, Google, Apple) alongside backend auth state management.
99Compare - local_auth
Pick if you need device-level biometric or passcode checks rather than federated Google account sign-in.
90Compare
Works with
Packages commonly used together with google_sign_in: ones it builds on, ones built on it, and its own family.
- google_sign_in_iosgoogle_sign_in depends on itiOS and macOS implementation of Google Sign-In for Flutter
- google_sign_in_androidgoogle_sign_in depends on itAndroid implementation of the google_sign_in plugin
- google_fontsSame familyFlutter package to load Google Fonts at runtime or bundle them as assets
- google_maps_flutter_androidSame familyAndroid implementation of the google_maps_flutter plugin.
- google_maps_flutter_iosSame familyiOS implementation of the google_maps_flutter plugin.
- google_maps_flutterSame familyA Flutter plugin for integrating Google Maps in Android, iOS, and web applications.
- google_maps_flutter_webSame familyWeb platform implementation of google_maps_flutter.
- google_identity_services_webSame familyDart JS-interop wrapper for Google Identity Services Web SDK