Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[google_sign_in] Allow initialization from Dart without adding native config files #96391

Closed
pr-Mais opened this issue Jan 10, 2022 · 15 comments · Fixed by flutter/plugins#5250
Closed
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter customer: crowd Affects or could affect many people, though not necessarily a specific customer. p: google_sign_in The Google Sign-In plugin P3 Issues that are less important to the Flutter project package flutter/packages repository. See also p: labels.

Comments

@pr-Mais
Copy link

pr-Mais commented Jan 10, 2022

Description

In the latest release of FlutterFire plugins, initialization of the DEFAULT Firebase App through Dart has been added, omitting the manual installation step, and enabling flutterfire_cli tool to make this step completely automatic.

Unfortunately, if the app is using google_sign_in, it requires developers to add back the manual installation step even though firebase_auth does support Dart-only initialization, as mentioned here.

Proposal

Allowing google_sign_in to initialize from Dart will make it possible for firebase_auth users to completely migrate to use Dart initialization through flutterfire_cli.

@maheshj01 maheshj01 added in triage Presently being triaged by the triage team p: first party p: google_sign_in The Google Sign-In plugin c: proposal A detailed proposal for a change to Flutter c: new feature Nothing broken; request for a new capability and removed in triage Presently being triaged by the triage team labels Jan 11, 2022
@stuartmorgan stuartmorgan added P3 Issues that are less important to the Flutter project passed secondary triage labels Jan 13, 2022
@loolooii
Copy link

Any update on this?

@marcusrohden
Copy link

Hey guys any updates? thanks again.

@crisboarna
Copy link
Contributor

Would be amazing to have this complete !

@darshankawar darshankawar added the customer: crowd Affects or could affect many people, though not necessarily a specific customer. label Apr 11, 2022
@iamsannyrai
Copy link

iamsannyrai commented Apr 11, 2022

@darshankawar I am bit confused in documentation. Yes it is mentioned in documentation that dart only initialization is not yet supported for google_sign_in, but it works on android but didn't in ios. I don't remember using google-services.json for android too.
I should have mentioned this before here.

@tudor07
Copy link

tudor07 commented Apr 12, 2022

Any updates? It's been 3 months already....

@rafaelcolladojr
Copy link

I'm also experiencing the same issue.

@ShahrearBinAmin
Copy link

Would love to get this fix!

@cyphl
Copy link

cyphl commented Apr 19, 2022

Finished migrating to dart-only initialization just to find out I'll have to rollback :(

@mono0926
Copy link
Contributor

mono0926 commented May 2, 2022

I've forked it and fixed: https://github.com/mono0926/plugins/tree/fix-flutterfire/packages/google_sign_in/google_sign_in_ios

Example:

@loolooii
Copy link

loolooii commented Jul 6, 2022

Can I ask what's keeping this from being reviewed/merged? Does it depend on this one? flutter/plugins#5250

@blaugold
Copy link
Contributor

blaugold commented Jul 6, 2022

@loolooii The PR you linked will fix this issue and is in the process of being landed, it just takes a while because it's a multistep process.

@blaugold
Copy link
Contributor

blaugold commented Jul 8, 2022

flutter/plugins#5250 has been merged, so GoogleService-Info.plist is no longer required on iOS.

It is still necessary to register CFBundleURLTypes in Info.plist, but that cannot be done at runtime, so google_sign_in cannot help with that.

@Prayer-RecycleSmart
Copy link

Thanks for merging the PR. This a very much need addition to entirely migrate to dart only initialisation.

Question:
Can CFBundleURLTypes list all the urls types of different firebase projects? If we could list there all the different revers google ID belonging to different accounts we could also deal with switching flavours dynamically without having to touch configuration files

@blaugold
Copy link
Contributor

blaugold commented Jul 8, 2022

Can CFBundleURLTypes list all the urls types of different firebase projects?

I don't see why not. CFBundleURLSchemes is an array which can contain more than one scheme that the app can handle. With a Xcode build script, you could remove all but one scheme in release builds to be safe.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 2022
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter customer: crowd Affects or could affect many people, though not necessarily a specific customer. p: google_sign_in The Google Sign-In plugin P3 Issues that are less important to the Flutter project package flutter/packages repository. See also p: labels.
Projects
None yet
Development

Successfully merging a pull request may close this issue.