For the past few weeks, I have been trying to get Firebase working with my Maui app. I have been trying the sample app from Firebase-Authentication-Dotnet NuGet package. Looking through the Pull Request I found some code on someone's entry for a Maui app. The code for their Pull Request is found here: Firebase-Authentication-Dotnet-Maui. When I run this code through the emulator I have gotten a lot further than I have before getting Firebase to work with Maui.
The login screen now shows all the providers.
This is new for me as I have been unable to get to this point by myself.
However, when I try to use "Sign In With Google". I get the following error.

File Name: FirebaseAuthClient.cs
public async Task SignInWithRedirectAsync(FirebaseProviderType authType, SignInRedirectDelegate redirectDelegate)
{
var provider = this.config.GetAuthProvider(authType);
if (!(provider is OAuthProvider oauthProvider))
{
throw new InvalidOperationException("You cannot sign in with this provider using this method.");
}
await this.CheckAuthDomain();
var continuation = await oauthProvider.SignInAsync();
// This is the offending code.
// I don't know why this line of code raises the "MauiContext Is Null."
var redirectUri = await redirectDelegate(continuation.Uri).ConfigureAwait(false);
// continuation.Uri has a value.
if (string.IsNullOrEmpty(redirectUri))
{
return null;
}
var userCredential = await continuation.ContinueSignInAsync(redirectUri).ConfigureAwait(false);
this.SaveToken(userCredential.User);
return userCredential;
}
MauiContext is null. Even though if I were to paste that continuation.Uri into my desktop browser works just fine!
I cannot figure out where this "MauiContex" is. I am struggling to figure this out and I am stuck.
System.InvalidOperationException: "MauiContext is null."
Has anyone else been successful with getting this NuGet to work with their Maui app? If so, will you be willing to share some other providers besides Email?
Providers = new FirebaseAuthProvider[]
{
new GoogleProvider(),
new FacebookProvider(),
new AppleProvider(),
new TwitterProvider(),
new GithubProvider(),
new MicrosoftProvider(),
new EmailProvider() // This is the only provider I have been successful with
},
If any you're looking for the code I have cloned this repository: Firebase-Authentication-Dotnet-Maui
Edit: I have reformatted per the recommendations in the comments.
