TobiasBuchholz / Plugin.Firebase

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

Auth Facebook does not work on Android #275

Open petrdrabek opened 8 months ago

petrdrabek commented 8 months ago

Hi! On Auth Facebook Android is not set muttability flag for pending intent. Handling activity result then ends up in exception.

Java.Lang.IllegalArgumentException: 'app.name: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

TobiasBuchholz commented 8 months ago

Hi,

for sign in with Facebook Plugin.Firebase.Auth.Facebook just calls the methods of FirebaseAuth: https://github.com/TobiasBuchholz/Plugin.Firebase/blob/34f6f5ba27bed3803b6b38b8461b2c959c4f85f7/src/Auth.Facebook/Platforms/Android/FirebaseAuthFacebookImplementation.cs#L30

That means creating the PendingIntent happens inside the Xamarin.Facebook.Android sdk and there is no way for Plugin.Firebase to set FLAG_IMMUTABLE or FLAG_MUTABLE. Furhtermore the sdk was last updated at 19.10.2021...you could create an issue on their repo and cross fingers someone responses.

petrdrabek commented 8 months ago

@TobiasBuchholz It looks like, they dont have intention to fix it soon (https://github.com/xamarin/FacebookComponents/pull/237#issuecomment-1345252138). Can we use fixed library for login like https://www.nuget.org/packages/Anjo.Android.Facebook/ in this plugin?

It would help a lot. Thanks.

petrdrabek commented 2 months ago

Any update on this? Or has someone workaround? This is still major issue for us.