Conversation
* feat(ui_oauth_google)!: migrate to google_sign_in 7 Migrates GoogleProvider to the google_sign_in 7 API, which adopts the UIScene lifecycle on iOS (google_sign_in_ios 6.3.0) and Swift Package Manager (6.3.3). Fixes the deprecated application lifecycle warning tracked in #673. - GoogleSignIn is now the shared instance and is initialized once before the first sign-in. - Authentication and authorization are separate steps. The provider reuses an existing authorization for the requested scopes and prompts for consent when one is not available, so the credential still carries an access token when scopes are requested. - A cancelled sign-in surfaces as AuthCancelledException, matching the previous flow reset behaviour. - Adds an optional serverClientId parameter to GoogleProvider, GoogleSignInButton and GoogleSignInIconButton for Android apps that do not use google-services.json. - Updates the integration test mocks to the new API. BREAKING CHANGE: consumers must follow the google_sign_in 7 platform integration steps: GIDClientID in Info.plist on iOS, and on Android a web OAuth client entry in google-services.json or an explicit serverClientId. When no scopes are requested the credential now contains only an ID token. * refactor(ui_oauth_google): simplify init and isolate it in tests Chain the retry-reset catchError directly onto initialize() instead of threading an intermediate local, and add a @VisibleForTesting debugReset() that clears the static one-time-init future so each test starts from a clean state with its freshly injected mock. Addresses review feedback on #689. * chore(ui_oauth_google): format provider.dart
Enables SPM for the tests app and drops the CocoaPods-only FirebaseFirestore fork override, which upstream firebase-ios-sdk makes redundant by shipping Firestore as a precompiled binaryTarget over SPM. Two fixes were needed to make SPM resolve and build. firebase_database floated to 12.6.0, whose Package.swift pins firebase-ios-sdk with exact: 12.19.0 while firebase_core pins exact: 12.18.0, which SPM cannot reconcile; it is now pinned to 12.5.0. The Runner target's IPHONEOS_DEPLOYMENT_TARGET was 13.0, below the 15.0 the Firebase packages require, which CocoaPods masked and SPM enforces. Package.resolved is gitignored alongside Podfile.lock to match the repo's existing lockfile convention. iOS and macOS both build. Still WIP: the firebase_ui_auth example app, the dead fork-pin rewriter in scripts/update_dependencies.dart, and the e2e.yml Pods caches are untouched, and desktop_webview_auth and twitter_login still force hybrid CocoaPods mode until #693 and #697 land. The AppDelegate/Info.plist changes are Flutter 3.44's unrelated UIScene migration and should be split out before this is ready.
There was a problem hiding this comment.
Code Review
This pull request upgrades the google_sign_in dependency to version 7.1.0, which includes significant changes to the initialization and authentication flow. It introduces serverClientId support, updates the GoogleProvider to use the new authenticate method, and updates test suites to accommodate these changes. Additionally, it enables Swift Package Manager for iOS and macOS projects and updates the firebase_database dependency. I have no feedback to provide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.