extension_google_sign_in_as_googleapis_auth
3.0.0, released a year ago by flutter.dev
Creates googleapis_auth AuthClient from GoogleSignIn credentials.
What it does
Provides an extension method that converts a GoogleSignIn authorization into a googleapis_auth AuthClient. The client can be used with googleapis package APIs to make authenticated calls.
AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to call Google APIs (e.g., People API) after a user signs in with Google Sign‑In.
- You want to avoid manually handling OAuth token exchange and refresh logic.
Skip it when
- You only need basic Google Sign‑In without accessing other Google APIs.
- You prefer a custom OAuth flow or another authentication provider.
Strengths
- Bridges two official Flutter packages seamlessly.
- Handles token refresh automatically via googleapis_auth.
- Works on all supported platforms (android, ios, web, macos).
Weaknesses
- Requires the newer GoogleSignInClientAuthorization flow (breaking change in 3.0.0).
- Limited to Google APIs; not a general OAuth solution.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
import 'package:extension_google_sign_in_as_googleapis_auth/extension_google_sign_in_as_googleapis_auth.dart';
import 'package:googleapis_auth/googleapis_auth.dart' as auth show AuthClient;
final authClient = await GoogleSignIn().signIn();
final client = await authClient.authClient(scopes: ['https://www.googleapis.com/auth/contacts.readonly']);
// Use client with googleapis, e.g., PeopleServiceApi(client);Alternatives
Packages that do the same job and could replace extension_google_sign_in_as_googleapis_auth.
- google_sign_in_ios
iOS and macOS implementation of Google Sign-In for Flutter
90Compare - google_sign_in_android
Android implementation of the google_sign_in plugin
88Compare - firebase_auth_web
Web implementation of Firebase Authentication for Flutter
85Compare - serverpod_auth_google_flutter
Sign in with Google for the Serverpod auth module
74Compare
Works with
Packages commonly used together with extension_google_sign_in_as_googleapis_auth: ones it builds on, ones built on it, and its own family.
- google_sign_inextension_google_sign_in_as_googleapis_auth depends on itOfficial Flutter plugin for authenticating users and requesting OAuth scopes via Google Sign-In.
- googleapis_authextension_google_sign_in_as_googleapis_auth depends on itObtain Access credentials and authenticated HTTP clients for Google APIs using OAuth 2.0.