google_identity_services_web
0.3.3+1, released 2 years ago by flutter.dev
Dart JS-interop wrapper for Google Identity Services Web SDK
What it does
Provides Dart bindings to Google’s Sign‑In‑With‑Google and OAuth2 JavaScript APIs, allowing Flutter Web apps to load the SDK and call its functions from Dart code.
AI-written summary of version 0.3.3+1, based on the package's README and metadata. Report an inaccuracy
Use it when
- Implement Google Sign‑In on a Flutter Web app
- Need to call Google OAuth2 flows from a web page
Skip it when
- Building a mobile or desktop app
- Using a server‑side authentication flow
Strengths
- Pure Dart wrapper, no native code
- Handles loading the SDK via script tag or on‑demand
- No need for allowInterop in callbacks
- Supports both authentication and authorization APIs
Weaknesses
- Web‑only, not usable on mobile or desktop
- Requires manual script tag or conditional import
- Limited to Google Identity Services, no other providers
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Add the package to pubspec, optionally insert <script src="https://accounts.google.com/gsi/client" async defer></script> in index.html or call loadWebSdk() in main.dart
import 'package:google_identity_services_web/loader.dart' as gis;
void main() async {
await gis.loadWebSdk(); // load the SDK
// use google.accounts.id or google.accounts.oauth2 via the provided bindings
}
Alternatives
Packages that do the same job and could replace google_identity_services_web.
- flutter_line_sdk
Flutter plugin to access native LINE SDKs for LINE Login integration.
86Compare - firebase_auth
Flutter plugin for Firebase Authentication enabling passwords, phone numbers, and identity providers.
99Compare - flutter_web_auth_2
Flutter plugin for authenticating a user with a web service.
93Compare - google_sign_in_all_platforms
Google Sign-In plugin supporting all platforms including Windows and Linux desktop.
74Compare
Works with
Packages commonly used together with google_identity_services_web: ones it builds on, ones built on it, and its own family.
- webgoogle_identity_services_web depends on itLightweight bindings for browser APIs via JS interop
- google_fontsSame familyFlutter package to load Google Fonts at runtime or bundle them as assets
- google_sign_in_iosSame familyiOS and macOS implementation of Google Sign-In for Flutter
- google_sign_in_androidSame familyAndroid implementation of the google_sign_in plugin
- google_sign_inSame familyOfficial Flutter plugin for authenticating users and requesting OAuth scopes via Google Sign-In.
- 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.