Skip to content

Conversation

@CaseyHillers
Copy link
Contributor

@CaseyHillers CaseyHillers commented Oct 28, 2019

Added Google Sign In service to FlutterBuildState. This gives easy access to authentication from the build dashboard.

Since Flutter's google_sign_in does not support web, this currently uses an open sourced fork called google_sign_in_all.

This fixes flutter/flutter#43108 bringing us one pull request closer to feature parity with v1.

Preview

sign_in_button
user_avatar

Open Issues

  • The user avatar image loaded has its colors inverted
    • I think this is a bug in the google_sign_in_all, but because of the low priority I have not investigated further

Future Work

  • Pass accessToken to CocoonService for authenticated requests
    • Necessary for rerunning tasks and viewing logs
  • Convert use of google_sign_in_all plugin to google_sign_in when web support is added
    • Convert the user image widget to the google_sign_in GoogleUserCircleAvatar widget
  • Move GoogleSignInService to a more global scope when new pages are added

Casey Hillers added 3 commits October 29, 2019 10:22
wasn't really being used since Google Sign In works locally
@CaseyHillers CaseyHillers changed the title [WIP] Authentication Service for Google Sign In Google Sign In Service Oct 29, 2019
@jonahwilliams
Copy link
Contributor

The user avatar image loaded has its colors inverted

IIRC this is the case if you don't specify what size image you want.

GoogleSignInService({GoogleSignIn googleSignIn})
: _googleSignIn = googleSignIn ??
setupGoogleSignIn(
scopes: <String>[
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe hoist these into private consts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

@CaseyHillers
Copy link
Contributor Author

CaseyHillers commented Oct 29, 2019

The user avatar image loaded has its colors inverted

IIRC this is the case if you don't specify what size image you want.

https://stackoverflow.com/questions/42893664/firebase-photourl-from-a-google-auth-provider-returns-a-jpg-with-colors-inverted

So this is a Googler only bug feature?

@jonahwilliams
Copy link
Contributor

Ahh weird, probably fine though :)

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit

@CaseyHillers CaseyHillers merged commit cee0346 into flutter:master Oct 29, 2019
@CaseyHillers CaseyHillers deleted the sign_in branch October 29, 2019 22:38
@ditman
Copy link
Member

ditman commented Nov 1, 2019

So close! flutter/plugins#2244

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Google Sign In

3 participants