Skip to content

Commit baf84e1

Browse files
add firebase get token action
1 parent 27ae00a commit baf84e1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import firebase from "../../firebase_admin_sdk.app.mjs";
2+
3+
export default {
4+
key: "firebase_admin_sdk-get-token",
5+
name: "Get Token",
6+
description: "Retrieves the OAuth token from a Firestore admin account for API requests. [See the documentation](https://firebase.google.com/docs/admin/setup/#initialize_the_sdk_in_non-google_environments)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
firebase,
11+
},
12+
async run({ $ }) {
13+
const token = await this.firebase._getToken();
14+
$.export("$summary", "Succesfully retrieved OAuth token");
15+
return token;
16+
},
17+
};

0 commit comments

Comments
 (0)