commit | 39678d1949780715afe8edf31fd9afc20273798b | [log] [tgz] |
---|---|---|
author | TPF <61667947+T-P-F@users.noreply.github.com> | Thu Nov 30 18:08:06 2023 +0100 |
committer | GitHub <noreply@github.com> | Thu Nov 30 17:08:06 2023 +0000 |
tree | 71dc24ada7efc2a898632e036c76a257c449358b | |
parent | 9cdc001de6d38c9e56d33b4e75fcb031673377ea [diff] |
[google_sign_in] Add server auth code retrieval to gis_client (#5358) Adds the ability for a Flutter web app to request a server auth code via gis through a web-only method. Reference docs: * https://developers.google.com/identity/oauth2/web/guides/use-code-model * https://developers.google.com/identity/oauth2/web/reference/js-reference#google.accounts.oauth2.initCodeClient Also: adds a `web_only.dart` library that allows programmers to call web-only methods conveniently, without having to dive into the `Platform.instance` (which has a ton of methods that we don't want users to call for sure!), like this: ```dart import 'package:google_sign_in_web/web_only.dart' as web; /// Renders a web-only Sign-In button. Widget buildSignInButton({HandleSignInFn? _}) { return web.renderButton(); } ``` Instead of: https://github.com/flutter/packages/blob/a6821898bd5a968f8ddafa8ae8e9a8c889caa00a/packages/google_sign_in/google_sign_in/example/lib/src/sign_in_button/web.dart#L12-L15 ### Issues * Fixes https://github.com/flutter/flutter/issues/62474 ### Tests * Added tests to ensure plugin calls hit the GIS API when appropriate. * [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. * [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. * [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.) * [x] I signed the [CLA]. * [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences] * [x] I listed at least one issue that this PR fixes in the description above. * [x] I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. * [x] I updated CHANGELOG.md to add a description of the change, [following repository CHANGELOG style]. * [x] I updated/added relevant documentation (doc comments with ///). * [x] I added new tests to check the change I am making, or this PR is [test-exempt]. * [x] All existing and new tests are passing.
This repo is a companion repo to the main flutter repo. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team). Check the packages
directory to see all packages.
These packages are also available on pub.
Please file any issues, bugs, or feature requests in the main flutter repo. Issues pertaining to this repository are labeled “package”.
If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.
If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide, and send a pull request.
These are the packages hosted in this repository: