You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an App only needs an `idToken`, or the OpenID Connect scopes, the "Sign In"
76
+
If an App only needs an `idToken`, or the OpenID Connect scopes, the Authentication
77
77
bits of the plugin should be enough for your app (`signInSilently` and `renderButton`).
78
78
79
79
#### What happened to the `signIn` method on the web?
80
80
81
81
Because the GIS SDK for web no longer provides users with the ability to create
82
82
their own Sign-In buttons, or an API to start the sign in flow, the current
83
-
implementation of `signIn` (that does authorization and authentication) is impossible
84
-
to implement on the web.
83
+
implementation of `signIn` (that does authorization and authentication) is no
84
+
longer feasible on the web.
85
85
86
86
The web plugin attempts to simulate the old `signIn` behavior by using the
87
87
[Oauth Implicit pop-up flow](https://developers.google.com/identity/oauth2/web/guides/use-token-model), which authenticates and authorizes users.
88
88
89
89
The drawback of this approach is that the Oauth flow **only returns an `accessToken`**,
90
90
and a synthetic version of the User Data, that does **not include an `idToken`**.
91
91
92
-
The solution to this is to migrate your custom "Sign In" buttons in the web to
93
-
the Button Widget provided by this package: `Widget renderButton`.
92
+
The solution to this is to **migrate your custom "Sign In" buttons in the web to
93
+
the Button Widget provided by this package: `Widget renderButton()`.**
94
94
95
95
_(Check the [package:google_sign_in example app](https://pub.dev/packages/google_sign_in/example)
96
96
for an example on how to mix the `renderButton` widget on the web, with a custom
@@ -152,6 +152,9 @@ so you do not need to add it to your `pubspec.yaml`.
152
152
However, if you `import` this package to use any of its APIs directly, you
153
153
should add it to your `pubspec.yaml` as usual.
154
154
155
+
For example, you need to import this package directly if you plan to use the
156
+
web-only `Widget renderButton()` method.
157
+
155
158
### Web integration
156
159
157
160
First, go through the instructions [here](https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid) to create your Google Sign-In OAuth client ID.
0 commit comments