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
We use the Firebase Admin SDK server-side to verify our user's login JWT token and create a session cookie. Create ./app/utils/firebase.server.ts
import * as admin from "firebase-admin";import { initializeApp } from "firebase-admin/app";if (admin.apps.length === 0) {initializeApp({credential: admin.credential.cert(JSON.parse(process.env.FIREBASE_ADMIN_SERVICE_ACCOUNT!)),});}export { admin };
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

