Skip to content
pubscout

firebase_admin_sdk

0.5.6, released 2 months ago by firebase.google.com

Firebase Admin SDK implementation for Dart server environments

$ flutter pub add firebase_admin_sdk
Source repository

What it does

Enables Dart servers and privileged environments to access Firebase services including Firestore, Cloud Storage, Auth, and Cloud Messaging. It provides authentication and database access using service accounts or application default credentials.

AI-written summary of version 0.5.6, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a backend server or cloud function in Dart that needs to interact with Firebase
  • You need administrative access to Firebase Authentication, Firestore, or Cloud Storage from a server

Skip it when

  • You are building a client-side Flutter application (use official client packages instead)
  • You require Realtime Database support, which is not currently supported by this package

Strengths

  • Allows full Dart stack development including server-side Firebase integration
  • Supports multiple authentication methods including service accounts and Workload Identity Federation

Weaknesses

  • Some Firebase services like Realtime Database and Data Connect are not supported
  • Requires server-side setup and secure management of service account credentials

Setup

Kind
FFI (native library)
Effort
Medium
Code generation
No
Direct dependencies
15

Requires a Firebase project, downloading a service account JSON file or configuring environment variables like GOOGLE_APPLICATION_CREDENTIALS.

import 'package:firebase_admin_sdk/firebase_admin_sdk.dart';

final app = FirebaseApp.initializeApp();
final defaultAuth = app.auth();
final defaultFirestore = app.firestore();

Alternatives

Packages that do the same job and could replace firebase_admin_sdk.

Works with

Packages commonly used together with firebase_admin_sdk: ones it builds on, ones built on it, and its own family.