From b17d85f8007bd775d366fa026c2b2e1fad06852c Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 11 May 2021 10:58:47 -0700 Subject: [PATCH 1/3] [google_sign_in] document web usage Fixes https://github.com/flutter/flutter/issues/81848 Also fixed some headers in the readme and one more link Prepare for v5.0.3 release --- .../google_sign_in/CHANGELOG.md | 3 +- .../google_sign_in/google_sign_in/README.md | 28 ++++++++++++++++--- .../google_sign_in/pubspec.yaml | 2 +- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/packages/google_sign_in/google_sign_in/CHANGELOG.md b/packages/google_sign_in/google_sign_in/CHANGELOG.md index 539121c2943c..aa62f302b9c2 100644 --- a/packages/google_sign_in/google_sign_in/CHANGELOG.md +++ b/packages/google_sign_in/google_sign_in/CHANGELOG.md @@ -1,6 +1,7 @@ -## NEXT +## 5.0.3 * Fixed links in `README.md`. +* Added documentation for usage on the web. ## 5.0.2 diff --git a/packages/google_sign_in/google_sign_in/README.md b/packages/google_sign_in/google_sign_in/README.md index 75d3029b283b..90a0e78005e3 100644 --- a/packages/google_sign_in/google_sign_in/README.md +++ b/packages/google_sign_in/google_sign_in/README.md @@ -6,7 +6,8 @@ _Note_: This plugin is still under development, and some APIs might not be available yet. [Feedback](https://github.com/flutter/flutter/issues) and [Pull Requests](https://github.com/flutter/plugins/pulls) are most welcome! -## Android integration +## Platform integration +### Android integration To access Google Sign-In, you'll need to make sure to [register your application](https://firebase.google.com/docs/android/setup). @@ -23,7 +24,7 @@ Make sure you've filled out all required fields in the console for [OAuth consent screen](https://console.developers.google.com/apis/credentials/consent). Otherwise, you may encounter `APIException` errors. -## iOS integration +### iOS integration 1. [First register your application](https://firebase.google.com/docs/ios/setup). 2. Make sure the file you download in step 1 is named @@ -57,7 +58,7 @@ Otherwise, you may encounter `APIException` errors. ``` -### iOS additional requirement +#### iOS additional requirement Note that according to https://developer.apple.com/sign-in-with-apple/get-started, starting June 30, @@ -70,12 +71,31 @@ The Flutter Favorite [sign_in_with_apple](https://pub.dev/packages/sign_in_with_apple) plugin could be an option. +### Web integration + + +#### Create authorization credentials + +1. Go to the [Credentials page](https://console.developers.google.com/apis/credentials). +1. Click **Create credentials > OAuth client ID**. +1. Select the **Web application** application type. +1. Name your OAuth 2.0 client and click **Create**. + +After configuration is complete, take note of the client ID that was created. You will need the client ID to complete the next steps. (A client secret is also created, but you need it only for server-side operations.) + +#### Specify your app's client ID + +Specify the client ID you created for your app in the Google Developers Console with the `google-signin-client_id` meta element. + +```html + +``` ## Usage ### Import the package To use this plugin, follow the -[plugin installation instructions](https://pub.dev/packages/google_sign_in#pub-pkg-tab-installing). +[plugin installation instructions](https://pub.dev/packages/google_sign_in/install). ### Use the plugin diff --git a/packages/google_sign_in/google_sign_in/pubspec.yaml b/packages/google_sign_in/google_sign_in/pubspec.yaml index 388814bb1409..9c0159c15f0b 100644 --- a/packages/google_sign_in/google_sign_in/pubspec.yaml +++ b/packages/google_sign_in/google_sign_in/pubspec.yaml @@ -2,7 +2,7 @@ name: google_sign_in description: Flutter plugin for Google Sign-In, a secure authentication system for signing in with a Google account on Android and iOS. homepage: https://github.com/flutter/plugins/tree/master/packages/google_sign_in/google_sign_in -version: 5.0.2 +version: 5.0.3 flutter: plugin: From 479034b35bf728ed9f51394975180077172cf261 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 11 May 2021 11:07:30 -0700 Subject: [PATCH 2/3] Update packages/google_sign_in/google_sign_in/README.md Co-authored-by: David Iglesias --- packages/google_sign_in/google_sign_in/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google_sign_in/google_sign_in/README.md b/packages/google_sign_in/google_sign_in/README.md index 90a0e78005e3..5dc915d5ae41 100644 --- a/packages/google_sign_in/google_sign_in/README.md +++ b/packages/google_sign_in/google_sign_in/README.md @@ -85,7 +85,7 @@ After configuration is complete, take note of the client ID that was created. Yo #### Specify your app's client ID -Specify the client ID you created for your app in the Google Developers Console with the `google-signin-client_id` meta element. +In your app's `web/index.html` file, specify the client ID you created for your app in the Google Developers Console with the `google-signin-client_id` meta element. ```html @@ -134,4 +134,3 @@ Future _handleSignIn() async { Find the example wiring in the [Google sign-in example application](https://github.com/flutter/plugins/blob/master/packages/google_sign_in/google_sign_in/example/lib/main.dart). - From 54644964b4e24902ee6e8d4001d335f2e8803a8c Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 11 May 2021 12:25:47 -0700 Subject: [PATCH 3/3] just point to web plugin --- .../google_sign_in/google_sign_in/README.md | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/packages/google_sign_in/google_sign_in/README.md b/packages/google_sign_in/google_sign_in/README.md index 5dc915d5ae41..6ed21c0fedd2 100644 --- a/packages/google_sign_in/google_sign_in/README.md +++ b/packages/google_sign_in/google_sign_in/README.md @@ -7,6 +7,7 @@ available yet. [Feedback](https://github.com/flutter/flutter/issues) and [Pull Requests](https://github.com/flutter/plugins/pulls) are most welcome! ## Platform integration + ### Android integration To access Google Sign-In, you'll need to make sure to @@ -73,23 +74,9 @@ be an option. ### Web integration - -#### Create authorization credentials - -1. Go to the [Credentials page](https://console.developers.google.com/apis/credentials). -1. Click **Create credentials > OAuth client ID**. -1. Select the **Web application** application type. -1. Name your OAuth 2.0 client and click **Create**. - -After configuration is complete, take note of the client ID that was created. You will need the client ID to complete the next steps. (A client secret is also created, but you need it only for server-side operations.) +For web integration details, see the +[`google_sign_in_web` package](https://pub.dev/packages/google_sign_in_web). -#### Specify your app's client ID - -In your app's `web/index.html` file, specify the client ID you created for your app in the Google Developers Console with the `google-signin-client_id` meta element. - -```html - -``` ## Usage ### Import the package