This course is no longer maintained and may be out-of-date. While it remains available for reference, its content may not reflect the latest updates, best practices, or supported features.
Setup Firebase Admin
Back at the project settings screen, navigate to service accounts
Generate a new private key
Rename to
firebase-admin.json
and move it to the project rootWe need to turn the JSON you downloaded into a string so we can save it in an environment variable. One way to do this is using Nodejs
- Create a file in project root
admin-parse.js
const { readFileSync } = require("fs");console.log(JSON.stringify(JSON.parse(readFileSync("firebase-admin.json"))));- Run
node ./admin-parse.js
- Create a file in project root
Copy the output string and save it for later. Delete
firebase-admin.json
andadmin-parse.js
Did you find this page helpful?
Start with GraphQL on Hasura for Free
Build apps and APIs 10x faster
Built-in authorization and caching
8x more performant than hand-rolled APIs

