google_sign_in_all_platforms_interface 0.2.0 copy "google_sign_in_all_platforms_interface: ^0.2.0" to clipboard
google_sign_in_all_platforms_interface: ^0.2.0 copied to clipboard

A common platform.dart interface for the google_sign_in_all_platforms plugin.

0.2.0 #

BREAKING CHANGES #

  • For Platform Implementers: New abstract methods that must be implemented
    • lightweightSignInImpl() - Platform-specific lightweight authentication implementation
    • signInOnlineImpl() - Platform-specific online authentication implementation
    • signInButtonImpl() - Platform-specific sign-in button implementation
    • signOutImpl() - Platform-specific sign-out implementation
  • For End Users: signInOffline() deprecated in favor of lightweightSignIn()
    • lightweightSignIn will use official recommended method for signing-in previously signed-in user

Added #

  • authenticationState broadcast stream - Emits GoogleSignInCredentials? on auth state changes (RECOMMENDED - for tracking auth state)
  • silentSignIn() method - Restores authentication from stored credentials. Though works on all platforms, NOT officially recommended for mobile and web.
  • Enhanced GoogleSignInCredentials class:
    • Added expiresIn field for token expiration tracking
    • Made class @immutable with equality operators
    • Added copyWith() method
  • Updated getAuthenticatedClient() implementation:
    • Automatic token validation via Google OAuth2 API
    • Token refresh when refresh tokens available
    • Auto sign-out on authentication failures
  • Automatic credential persistence to local storage, i.e will always automatically use saveAccessToken, retrieveAccessToken and deleteAccessToken methods.

Changed #

  • signIn() now tries lightweightSignIn() first, falls back to signInOnline(), for all platforms.
  • All authentication methods now automatically update authentication state
  • Refactored to implementation pattern (@nonVirtual public methods, @protected impl methods)

New Dependencies #

  • Added googleapis: ^14.0.0
  • Added googleapis_auth: ^2.0.0

0.1.0 #

BREAKING CHANGES #

  • Earlier signIn would only do signInOffline for mobile, since, both were same, for mobile, though now, added explicit check to call signInOnline in case of null from offline method.

Enhancements #

  • Web Platform Support: Added comprehensive web platform support with Google Sign-In button integration
  • GSIAPButtonConfig: Introduced new GSIAPButtonConfig class for configuring Google Sign-In buttons on web platforms
  • signInButton Method: Added signInButton() method to the interface for web platform button rendering

0.0.6 #

Added [GoogleSignInParams.customPostAuthPage] to allow custom page after successful sign in.

0.0.5 #

Removed asserts from [GoogleSignInParams] and made it 'const' again.

0.0.4 #

[DON'T USE] Made the [GoogleSignInParams] non 'const', causing a breaking change. Exposed new global getters [isDesktop] and [isMobile]. Added asserts in [GoogleSignInParams] for different platforms.

0.0.3 #

Added new method called [signIn], which will first try [signInOffline] then [signInOnline].

0.0.2 #

Updated default values of [GoogleSignInParams.scopes], removed drive scope.

0.0.1 #

Provides mainly 3 classes, [GoogleSignInAllPlatformsInterface], [GoogleSignInParams] and [GoogleSignInCredentials].

1
likes
150
points
1.07k
downloads

Publisher

verified publishervishnuworld.com

Weekly Downloads

A common platform.dart interface for the google_sign_in_all_platforms plugin.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, googleapis, googleapis_auth, http, plugin_platform_interface, shared_preferences

More

Packages that depend on google_sign_in_all_platforms_interface