step-up-labs / firebase-authentication-dotnet

C# library for Firebase Authentication
MIT License
379 stars 129 forks source link

Firebase UI (WPF + UWP + Xamarin) #100

Closed bezysoftware closed 1 year ago

bezysoftware commented 4 years ago

I started rewriting the FirebaseAuthentication.net library from scratch. I noticed that the payloads that the current version (v3) sends out are not the same as the Javascript version of the library and I wanted to unify it, possibly adding other providers along the way ( phone, apple, microsoft, etc.). It actually makes the whole flow significantly easier to use, because the API gives you the OAuth url to navigate the user to, and also automatically process the redirect uri at the end of the flow. This means you don't have to manually (or via extra package) communicate with Facebook and others to get the access_token to give to Firebase.

With this simplified flow it also started to make sense to build a UI on top of it - just like the official Firebase UI - that you could just drop to your design surface and it would handle everything for you. I currently have a working prototype for WPF, but I plan to to write a version for UWP and Xamarin as well.

The code currently lives in v4 branch, but feel free to check it out and comment on the API.

image

As you can see from the screenshot, it now supports 6 providers + anonymous, localization (35+ languages taken from Firebase repo) and native email flow. It is still missing some key pieces (e.g. credentials persistence is currently in-memory only) but it is usable for demo.

Please, let me know your thoughts, ideas, comments... in this issue

bronquit commented 4 years ago

Thank you for this - looking forward to FirebaseUI for Xamarin. Do you plan on including support for Xamarin Native as well? (Xamarin.Android and Xamarin.iOS without .Forms)

According to this it sounds like Xamarin.Forms will be a dependency:

FirebaseAuthentication.Xamarin targets Xamarin.Forms

bezysoftware commented 4 years ago

Yes, that's the plan currently. But maybe there is a way to write it for Android and iOS separately and have it also work in a Forms app? I'll evaluate after I finish uwp version

cabauman commented 4 years ago

This looks amazing. Just now saw this issue. How's it coming along, since the original post?

bezysoftware commented 4 years ago

The UWP and WPF platforms are pretty much ready and can be used, but I haven't yet started Xamarin, too busy at work 😔

cabauman commented 4 years ago

I understand. Let me know if there's anything I can do to help.

trevorm7 commented 4 years ago

I'm using 4.0.0-alpha.2 and the AuthStateChanged event isn't triggering after I sign in using email without any errors or exceptions.

angelru commented 4 years ago

what a great idea! I know it's very nice, let's see if it's ready for xamarin ...

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

MO35AB commented 3 years ago

is this project still working ? cant find the UI for wpf :(

bezysoftware commented 3 years ago

I haven't had time in the last months to spend on this project but the WPF version is here: https://www.nuget.org/packages/FirebaseAuthentication.wpf/

bezysoftware commented 1 year ago

Released