Zero boilerplate, delightful DX
// 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);
}
}
Features
Full Firebase SDK coverage with native C# types, IntelliSense support, and compile-time safety.
Email/password, Google, GitHub, Microsoft OAuth with seamless Blazor authorization integration.
LINQ-style queries, real-time subscriptions, transactions, and batch operations.
Upload with progress tracking, metadata management, and secure download URLs.
Live sync, presence detection, offline support, and optimistic updates.
Gemini streaming, function calling, grounding, and multi-modal support.
reCAPTCHA v3/Enterprise protection to safeguard your backend resources.
Why FireBlazor?
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 |
Quick Start
From zero to Firebase in under a minute.
Add FireBlazor to your Blazor project via NuGet.
dotnet add package FireBlazor
Add Firebase services to your application in 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();
Inject and use Firebase services in your components.
@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!
}
}
}