Closed lukey78 closed 6 months ago
That's a tough one... I guess it is most advisable to just use google_sign_in
which does the entire authentication natively (and using best practices for the specific use case of Google logins on Android).
From what I can read online, it does not seem to be easily possible to use flutter_web_auth_2
then for Google signin anymore without some compromise. I will probably add that to the README when I am 100% sure it cannot be done (easily)
I made it work with google_sign_in
, but implementation is not straightforward - there are many stepstones along the way, as Google does not seem to implement a standard OIDC. Even more, Android and iOS have to be treated differently. I tried to update the documentation of the google_sign_in package (https://github.com/flutter/packages/pull/6292) but my pull request got rejected by Google.
I think you can close this issue. With a reference to my pull request people should be able to find some current documentation about the implementation.
Thank you very much for updating this issue with your findings! Indeed, for future reference, it should be enough to reference either this issue or your PR - hence I will close this issue here as well. If I find something new (which is unlikely, but one can dream...), I will reopen it and see what I can do :)
Recently I used flutter_appauth to login my users via Google into the app. But because I am also using flutter_web_auth_2 for authenticating against many other OAuth1/OAuth2 providers, there were 2 Android activities/intents being filtered on redirects causing a popup for the user having to choose one of the activities. That's why I decided to get rid of flutter_appauth and just use this package for everything.
But... Google has deprecated custom URI schemes for new Android clients and suggests the official Google Android SDK.
Is it possible to use this package with Android clients to sign users in via Google, without enabling the deprecated custom URI schemes?