.NET 8, 9, 10 Ready

Firebase for Blazor

Zero boilerplate, delightful DX

UserService.cs
// Simple, type-safe Firebase operations
var result = await firestore
    .Collection("users")
    .WhereEqualTo("status", "active")
    .OrderByDescending("createdAt")
    .Limit(10)
    .GetAsync<User>();

if (result.IsSuccess)
{
    foreach (var user in result.Value)
    {
        Console.WriteLine(user.Name);
    }
}

Everything you need to build with Firebase

Full Firebase SDK coverage with native C# types, IntelliSense support, and compile-time safety.

🔐

Authentication

Email/password, Google, GitHub, Microsoft OAuth with seamless Blazor authorization integration.

📄

Cloud Firestore

LINQ-style queries, real-time subscriptions, transactions, and batch operations.

📦

Cloud Storage

Upload with progress tracking, metadata management, and secure download URLs.

Realtime Database

Live sync, presence detection, offline support, and optimistic updates.

🤖

AI Logic

Gemini streaming, function calling, grounding, and multi-modal support.

🛡️

App Check

reCAPTCHA v3/Enterprise protection to safeguard your backend resources.

A better developer experience

See how FireBlazor compares to using the JavaScript SDK via interop.

FireBlazor JS SDK via Interop
Native C# types Manual JS interop
LINQ-style queries String-based queries
Result<T> error handling Try-catch exceptions
Blazor authorization integration Manual auth state
IntelliSense & compile-time safety Runtime errors

Get started in 3 steps

From zero to Firebase in under a minute.

1

Install the package

Add FireBlazor to your Blazor project via NuGet.

Terminal
dotnet add package FireBlazor
2

Configure Firebase

Add Firebase services to your application in Program.cs.

Program.cs
using FireBlazor;

var builder = WebAssemblyHostBuilder.CreateDefault(args);

builder.Services.AddFirebase(options =>
{
    options.ApiKey = "your-api-key";
    options.AuthDomain = "your-project.firebaseapp.com";
    options.ProjectId = "your-project-id";
});

await builder.Build().RunAsync();
3

Start building

Inject and use Firebase services in your components.

MyComponent.razor
@inject IFirebaseAuth Auth
@inject IFirestore Firestore

@code {
    private async Task SignIn()
    {
        var result = await Auth.SignInWithEmailAsync(
            email, password);

        if (result.IsSuccess)
        {
            // User is signed in!
        }
    }
}