Skip to content

Commit

Permalink
Fix messaging errors (#43)
Browse files Browse the repository at this point in the history
fixes #22
  • Loading branch information
rrousselGit authored Jul 15, 2024
1 parent 85c3680 commit dd8ef56
Show file tree
Hide file tree
Showing 13 changed files with 988 additions and 780 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: dart analyze

- name: Run tests
run: ${{github.workspace}}/scripts/coverage.sh
run: firebase emulators:exec --project dart-firebase-admin --only auth,firestore "dart test"

- name: Upload coverage to codecov
run: curl -s https://codecov.io/bash | bash
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"Millis",
"OIDC",
"pbkdf",
"responsetype",
"rrggbb",
"rrggbbaa",
"SIGNIN",
Expand Down
5 changes: 4 additions & 1 deletion packages/dart_firebase_admin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Unreleased fix
## Unreleased minor

- Fixes some errors incorrectly coming back as "unknown".
- Renamed various error codes to remove duplicates and removed
unused codes.
- Fixes crash when updating users (thanks to @HeySreelal)
- Marked various classes that cannot be extended as base/final.

Expand Down
11 changes: 10 additions & 1 deletion packages/dart_firebase_admin/lib/src/app/firebase_admin.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
part of '../app.dart';

class FirebaseAdminApp {
FirebaseAdminApp.initializeApp(this.projectId, this.credential);
FirebaseAdminApp.initializeApp(
this.projectId,
this.credential, {
Client? client,
}) : _clientOverride = client;

/// The ID of the Google Cloud project associated with the app.
final String projectId;
Expand Down Expand Up @@ -31,8 +35,13 @@ class FirebaseAdminApp {
auth3.IdentityToolkitApi.firebaseScope,
],
);
final Client? _clientOverride;

Future<Client> _getClient(List<String> scopes) async {
if (_clientOverride != null) {
return _clientOverride;
}

if (isUsingEmulator) {
return _EmulatorClient(Client());
}
Expand Down
Loading

0 comments on commit dd8ef56

Please sign in to comment.