Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 44 additions & 42 deletions packages/dart_firebase_admin/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Firebase Admin Dart SDK

## Table of Contents

- [Overview](#overview)
- [Supported Services](#supported-services)
- [Installation](#installation)
- [Add the Firebase Admin SDK to your server](#add-the-firebase-admin-sdk-to-your-server)
- [Prerequisites](#prerequisites)
- [Set up a Firebase project and service account](#set-up-a-firebase-project-and-service-account)
- [Add the SDK](#add-the-sdk)
- [Initialize the SDK](#initialize-the-sdk)
- [Initialize the SDK in non-Google environments](#initialize-the-sdk-in-non-google-environments)
- [Using Workload Identity Federation](#using-workload-identity-federation)
- [Using Workload Identity Federation](#using-workload-identity-federation)
- [Initialize multiple apps](#initialize-multiple-apps)
- [Testing with gcloud end user credentials](#testing-with-gcloud-end-user-credentials)
- [Usage](#usage)
Expand All @@ -21,8 +20,6 @@
- [Messaging](#messaging)
- [Storage](#storage)
- [Security Rules](#security-rules)
- [Supported Services](#supported-services)
- [Additional Packages](#additional-packages)
- [Contributing](#contributing)
- [License](#license)

Expand All @@ -36,6 +33,33 @@ Admin Dart SDK enables access to Firebase services from privileged environments
For more information, visit the
[Firebase Admin SDK setup guide](https://firebase.google.com/docs/admin/setup/).

## Supported Services

The Firebase Admin Dart SDK currently supports the following Firebase services:

- 🟢 - Fully supported
- 🟡 - Partially supported / Work in progress
- 🔴 - Not supported

| Service | Status | Notes |
|--------------------|:------:|--------------------------------------|
| App | 🟢 | |
| App Check | 🟢 | |
| Authentication | 🟢 | |
| Data Connect | 🔴 | |
| Realtime Database | 🔴 | |
| Event Arc | 🔴 | |
| Extensions | 🔴 | |
| Firestore | 🟢 | Via [package:google_cloud_firestore] |
| Functions | 🟢 | |
| Installations | 🔴 | |
| Machine Learning | 🔴 | |
| Messaging | 🟢 | |
| Project Management | 🔴 | |
| Remote Config | 🔴 | |
| Security Rules | 🟢 | |
| Storage | 🟢 | Via [package:google_cloud_storage] |

## Installation

The Firebase Admin Dart SDK is available on [pub.dev](https://pub.dev/) as `dart_firebase_admin`:
Expand Down Expand Up @@ -94,7 +118,8 @@ final app = FirebaseApp.initializeApp();

To optionally specify initialization options for services such as Realtime Database, Cloud Storage, or Cloud Functions, use the `FIREBASE_CONFIG` environment variable. If the content of the `FIREBASE_CONFIG` variable begins with a `{` it will be parsed as a JSON object. Otherwise the SDK assumes that the string is the path of a JSON file containing the options.

> **Note:** The `FIREBASE_CONFIG` environment variable is included automatically in App Hosting backends and Cloud Functions for Firebase functions.
> [!NOTE]
> The `FIREBASE_CONFIG` environment variable is included automatically in App Hosting backends and Cloud Functions for Firebase functions.

```bash
export FIREBASE_CONFIG='{"projectId":"my-project"}'
Expand Down Expand Up @@ -218,7 +243,8 @@ final otherAuth = otherApp.auth();
final otherFirestore = otherApp.firestore();
```

> **Note:** Each app instance has its own configuration options and authentication state.
> [!NOTE]
> Each app instance has its own configuration options and authentication state.

### Testing with gcloud end user credentials

Expand Down Expand Up @@ -358,6 +384,9 @@ print('Token: ${result.token}');

### Firestore

> [!NOTE]
> The core firestore API is provided by [package:google_cloud_firestore].

```dart
import 'dart:async';
import 'package:dart_firebase_admin/dart_firebase_admin.dart';
Expand Down Expand Up @@ -582,6 +611,9 @@ await messaging.unsubscribeFromTopic(['<token-1>', '<token-2>'], 'news');

### Storage

> [!NOTE]
> The core storage API is provided by [package:google_cloud_storage].

```dart
import 'dart:typed_data';
import 'package:dart_firebase_admin/dart_firebase_admin.dart';
Expand Down Expand Up @@ -705,44 +737,14 @@ print('Created ruleset: ${ruleset.name}');
await securityRules.deleteRuleset(ruleset.name);
```

## Supported Services

The Firebase Admin Dart SDK currently supports the following Firebase services:

🟢 - Fully supported <br />
🟡 - Partially supported / Work in progress <br />
🔴 - Not supported

| Service | Status | Notes |
|-----------------------|---------|--------------------------------|
| App | 🟢 | |
| App Check | 🟢 | |
| Authentication | 🟢 | |
| Data Connect | 🔴 | |
| Realtime Database | 🔴 | |
| Event Arc | 🔴 | |
| Extensions | 🔴 | |
| Firestore | 🟢 | Excludes realtime capabilities |
| Functions | 🟢 | |
| Installations | 🔴 | |
| Machine Learning | 🔴 | |
| Messaging | 🟢 | |
| Project Management | 🔴 | |
| Remote Config | 🔴 | |
| Security Rules | 🟢 | |
| Storage | 🟢 | |

## Additional Packages

Alongside the Firebase Admin Dart SDK, this repository contains additional workspace/pub.dev packages to accomodate the SDK:

- [google_cloud_firestore](/packages/google_cloud_firestore/): Standalone Google APIs Firestore SDK, which the Firebase SDK extends.
- [google_cloud_storage](https://github.com/googleapis/google-cloud-dart/tree/main/packages/google_cloud_storage): Standalone Google Cloud Storage SDK, which the Firebase SDK extends.

# Contributing
## Contributing

Contributions are welcome! Please read the [contributing guide](CONTRIBUTING.md) to get started.

# License
## License

[Apache License Version 2.0](LICENSE)

[package:google_cloud_firestore]: https://pub.dev/packages/google_cloud_firestore
[package:google_cloud_storage]: https://pub.dev/packages/google_cloud_storage
Loading