Skip to content

[google_sign_in] Add exception info to migration guide #9574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/google_sign_in/google_sign_in/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 7.1.1

* Adds more documentation about the requirement to call `initialize` exactly
once.
* Adds information about `GoogleSignInException` to the migration guide.

## 7.1.0

* Adds the missing export of `GoogleSignInExceptionCode`, to allow for
Expand Down
7 changes: 7 additions & 0 deletions packages/google_sign_in/google_sign_in/MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,10 @@ include:
publishing, the only platform that does not support `authenticate` is web,
where `google_sign_in_web`'s `renderButton` is used to create a sign-in
button.
* Outcomes other than successful authentication or authorization will throw
`GoogleSignInException`s in most cases, allowing a clear way to distinguish
different sign in failure outcomes. This includes the user canceling
sign-in, which will throw an exception with a `code` of
`GoogleSignInExceptionCode.canceled`.
* Similarly, the `authenticationEvents` will receive exceptions as
stream errors, unlike the event stream from version 6.x.
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,16 @@ class GoogleSignIn {

/// Returns the single [GoogleSignIn] instance.
///
/// [initialize] must be called on this instance, and its future allowed to
/// complete, before any other methods on the object are called.
/// [initialize] must be called on this instance exactly once, and its future
/// allowed to complete, before any other methods on the object are called.
static final GoogleSignIn instance = GoogleSignIn._();

/// Initializes the sign in manager with the given configuration.
///
/// Clients must call this method exactly once, and wait for its future to
/// complete, before calling any other methods on this object.
/// complete, before calling any other methods on this object. Calling other
/// methods without waiting for this method to return, or calling this method
/// more than once, will result in undefined behavior.
///
/// [clientId] is the identifier for your client application, as provided by
/// the Google Sign In server configuration, if any. This does not need to be
Expand Down
2 changes: 1 addition & 1 deletion packages/google_sign_in/google_sign_in/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for Google Sign-In, a secure authentication system
for signing in with a Google account.
repository: https://github.com/flutter/packages/tree/main/packages/google_sign_in/google_sign_in
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_sign_in%22
version: 7.1.0
version: 7.1.1

environment:
sdk: ^3.6.0
Expand Down