v0.3.1+4
firebase_admin
순수하고 자연스러운 다트 코드로 이식된 Firebase Admin SDK
98좋아요 97830일 다운로드160Pub 점수
AndroidiOSmacOSWindowsLinux
Firebase 관리 SDK의 순수 Dart 구현
^1.1.0^0.2.2^0.3.5+1^4.0.0^0.4.3^1.0.10^1.8.0^1.4.0>=0.13.0 <2.0.0^0.3.0^1.15.0^0.8.0>=0.1.2 <0.3.0^0.2.5^1.0.4>=0.9.2 <15.0.0^1.17.8^1.2.0^6.0.0^5.0.10^6.3.2아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A pure Dart implementation of the Firebase admin sdk
Currently, only supports admin methods for the following firebase services:
import 'package:firebase_admin/firebase_admin.dart';
main() async {
var app = FirebaseAdmin.instance.initializeApp(AppOptions(
credential: ServiceAccountCredential('service-account.json'),
));
var link = await app.auth().generateSignInWithEmailLink('jane@doe.com',
ActionCodeSettings(url: 'https://example.com'));
print(link);
}
import 'package:firebase_admin/firebase_admin.dart';
import 'package:firebase_admin/src/credential.dart';
void main() async {
// applicationDefault() will look for credentials in the following locations:
// * the env variable GOOGLE_APPLICATION_CREDENTIALS
// * a configuration file, specific for this library, stored in the user's home directory
// * gcloud's application default credentials
// * credentials from the firebase tools
var credential = Credentials.applicationDefault();
// when no credentials found, login using openid
// the credentials are stored on disk for later use
credential ??= await Credentials.login();
// create an app
var app = FirebaseAdmin.instance.initializeApp(AppOptions(
credential: credential ?? Credentials.applicationDefault(),
projectId: 'some-project'));
try {
// get a user by email
var v = await app.auth().getUserByEmail('jane@doe.com');
print(v.toJson());
} on FirebaseException catch (e) {
print(e.message);
}
}
Please file feature requests and bugs at the issue tracker.
Creating and maintaining this package takes a lot of time. If you like the result, please consider to :heart: sponsor. With your support, I will be able to further improve and support this project. Also, check out my other dart packages at pub.dev.