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

  1. Back at the project settings screen, navigate to service accounts

  2. Generate a new private key

  3. Rename to firebase-admin.json and move it to the project root

  4. We 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

    1. Create a file in project root admin-parse.js
    const { readFileSync } = require("fs");
    console.log(JSON.stringify(JSON.parse(readFileSync("firebase-admin.json"))));
    1. Run node ./admin-parse.js
  5. Copy the output string and save it for later. Delete firebase-admin.json and admin-parse.js

Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2025 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin
graphql-handbook