-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Add google_sign_in_web plugin. #2280
Conversation
CaseyHillers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this David! Just some quick catches.
packages/google_sign_in/google_sign_in_web/test/gapi_mocks/gapi_mocks.dart
Show resolved
Hide resolved
packages/google_sign_in/google_sign_in_web/test/gapi_mocks/src/gapi_load.dart
Outdated
Show resolved
Hide resolved
packages/google_sign_in/google_sign_in_web/test/gapi_mocks/src/gapi_load.dart
Outdated
Show resolved
Hide resolved
harryterkelsen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
packages/google_sign_in/google_sign_in_web/lib/google_sign_in_web.dart
Outdated
Show resolved
Hide resolved
packages/google_sign_in/google_sign_in_web/lib/google_sign_in_web.dart
Outdated
Show resolved
Hide resolved
|
I was literally looking for this minutes ago and then found this pull request by chance, Thank you SO much for this work and I hope it gets merged and updated very soon! |
@jr942 a pull request is not the best place to have a personal conversation. If you want to help with the project, you can start taking a look at the documentation: Contributing to Flutter @jr942 una pull request no es el mejor sitio para tener una conversación personal. Si quieres ayudar al proyecto, puedes empezar echando un ojo a la documentación: Contributing to Flutter |
packages/google_sign_in/google_sign_in_web/test/gapi_mocks/src/gapi.dart
Outdated
Show resolved
Hide resolved
f33c04a to
bb4fd7d
Compare
collinjackson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm with some minor testing nits
packages/google_sign_in/google_sign_in_web/lib/google_sign_in_web.dart
Outdated
Show resolved
Hide resolved
packages/google_sign_in/google_sign_in_web/lib/google_sign_in_web.dart
Outdated
Show resolved
Hide resolved
| ' or pass clientId when calling init()'); | ||
|
|
||
| assert( | ||
| !scopes.any((String scope) => scope.contains(' ')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this assertion should happen in the app-facing package? Aren't spaces a problem in the mobile version of the plugin as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're a problem here because we use the space as a "join" character to pass the scopes to JS. In the mobile versions, the List is preserved all the way through.
I'm guessing a scope name with a space character is invalid there as well (scopes are URLs, after all), but I couldn't find any actual validation performed on the Android or IOS side. It will just probably... not work, or you'll get a bad request error or similar when authenticating.
This was added here to be helpful with the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(No validation on the app facing interface either)
d5d5b60 to
c3b12da
Compare
|
Do you guys know when it will be available in pub? |
@arctouch-felipefontes it's available in pub already at https://pub.dev/packages/google_sign_in_web |
|
Hey i'm trying to use it. and i got this error after the login. and signin never returns. Where exactly should i open the issue here? |
|
@arctouch-felipefontes go here, click "Get Started" on the "I have a problem with my Flutter application." section, fill in as much detail as you can on the issue, and then add the |
* Look at the README.md of this package for usage instructions. Please file issues for platform: web so we see them!

Description
Adds a web implementation of the google_sign_in plugin, via JS interop with the gapi object.
The JS interop facade is auto-generated with the dart-lang/js_facade_gen tool, from the TypeScript definitions (gapi, gapi.auth2)
Related Issues
flutter/flutter#43774
Missing stuff
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?