Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[google_sign_in] Adding serverClientID optional argument, support for both iOS and Android #1475

Closed

Conversation

jarrodsinclair
Copy link
Contributor

Description

Adding optional argument to GoogleSignIn class to support a serverClientID string. This is required, for instance, to generate a user token to access a Google Cloud-IAP protected resource.

Example:

GoogleSignIn _googleSignIn = GoogleSignIn(
  serverClientID: "xxxxxxxxx.apps.googleusercontent.com", // OAuth Client ID of the IAP protected resource
);

Related Issues

Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See [Contributor Guide]).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the [Flutter Style Guide].
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy].
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the [CLA].
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@jarrodsinclair
Copy link
Contributor Author

It looks like the test+format check fails as it computes a different formatting result compared to the recommended command:

pub global run flutter_plugin_tools format --plugins google_sign_in

For file packages/google_sign_in/example/lib/main.dart (line 57), the recommended command gives:

      'https://people.googleapis.com/v1/people/me/connections'
          '?requestMask.includeField=person.names',

(with 4 spaces indent from above)

Whilst the check on Cirrus CI aligns with the above line:

      'https://people.googleapis.com/v1/people/me/connections'
      '?requestMask.includeField=person.names',

Which format is correct?

@cyanglaz
Copy link
Contributor

Thank you for providing this PR. There is an earlier PR #879 adding the same feature with similar code. Do you mind if i close this one and you can track the progress on the other one?

@cyanglaz
Copy link
Contributor

Closing this PR, duplicate with #879

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants