TobiasBuchholz / Plugin.Firebase

Wrapper around the native Android and iOS Firebase Xamarin SDKs
MIT License
211 stars 49 forks source link

Split Google SignIn support into separate package? #179

Closed AdamEssenmacher closed 11 months ago

AdamEssenmacher commented 1 year ago

The native FirebaseAuth SDK does not have a dependency on GoogleSignIn, but Plugin.Firebase.Auth has a dependency on Xamarin.Google.iOS.SignIn.

From an architecture perspective, this introduces a possibly unnecessary dependency to projects that need FirebaseAuth, but have no need for GoogleSignIn.

For a tangible example of why this can be a issue: GoogleSignIn < 6.0.0 doesn't work on simulators. Microsoft hasn't updated Xamarin.Google.iOS.SignIn past version 5.x.x. So, simulators aren't going to work for projects using Plugin.Firebase.Auth--even if the project doesn't actually use GoogleSignIn.

It look like the dependency is only used to implement IFirebaseAuth.SignInWithGoogleAsync() and IFirebaseAuth.LinkWithGoogleAsync(). I think it would be a bit cleaner if this plugin had an (optional) add-on package for GoogleSignIn, rather than requiring the dependency.

I'd be happy to have a go at a PR if this is something you'd consider.

TobiasBuchholz commented 1 year ago

Yes, makes sense, go for it and thanks! :)