-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
54 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
@Deprecated('use firebase_rest_io') | ||
import 'package:tekartik_firebase_rest/firebase_rest.dart'; | ||
|
||
FirebaseAdminCredentialRest newFromServiceAccountJson(String serviceAccountJson, | ||
{List<String>? scopes}) => | ||
throw UnsupportedError('newFromServiceAccountJson io only'); | ||
FirebaseAdminCredentialRest newFromServiceAccountMap(Map serviceAccountMap, | ||
{List<String>? scopes}) => | ||
throw UnsupportedError('newFromServiceAccountMap io only'); | ||
// This actually work on the web... | ||
export 'firebase_rest_io.dart' | ||
show newFromServiceAccountJson, newFromServiceAccountMap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
library tekartik_firebase_rest.rest_common_test; | ||
|
||
import 'package:tekartik_firebase/firebase_admin.dart'; | ||
import 'package:tekartik_firebase_rest/firebase_rest.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
Future main() async { | ||
test('setup', () async { | ||
var serviceAccountMap = { | ||
'type': 'service_account', | ||
'project_id': 'xxx', | ||
'private_key_id': 'yyy', | ||
'private_key': 'zzz', | ||
'client_email': 'aaa', | ||
'client_id': 'bbbb', | ||
'auth_uri': 'ccc', | ||
'token_uri': 'ddd', | ||
'auth_provider_x509_cert_url': 'eee', | ||
'client_x509_cert_url': 'fff' | ||
}; | ||
var firebaseAdmin = firebaseRest as FirebaseAdmin; | ||
try { | ||
firebaseAdmin.credential.setApplicationDefault( | ||
FirebaseAdminCredentialRest.fromServiceAccountMap( | ||
serviceAccountMap, | ||
// scopes: scopes | ||
)); | ||
print(firebaseAdmin.credential.applicationDefault()); | ||
await firebaseAdmin.credential.applicationDefault()?.getAccessToken(); | ||
} catch (_) {} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters