LaunchKit · 2026
Back to Skills

firebase-auth-setup

Configures Firebase Authentication — providers, security rules, custom claims, and React auth hooks.

0
443 downloads
by @guifav

Setup & Installation

openclaw skills install @guifav/firebase-auth-setup

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install firebase-auth-setup

Version History

v0.1.1Feb 18, 2026 - Version note by skill developer:

- Planning protocol updated: You must only use `.env.example` (not `.env.local`) when checking for expected Firebase environment variables, to prevent accidental reading of real credentials. - Documentation clarified in the Planning Protocol step 2 for improved security and review procedures. - No logic or API changes; only the setup/checklist process and documentation were updated.

What This Skill Does

Configures Firebase Authentication in Next.js App Router projects. Sets up auth providers (Google, Apple, email/password), React hooks, middleware, and syncs Firebase users with Supabase profiles. Handles custom claims for role-based access control.

Handles the tricky Firebase-Supabase sync that most auth guides skip, including the RLS-compatible UID mapping and upsert logic.

When to use it

  • Adding Google and Apple sign-in to a Next.js app
  • Syncing Firebase user accounts with a Supabase database
  • Setting up admin/editor/viewer roles with custom JWT claims
  • Protecting API routes with server-side token verification
  • Bootstrapping a full auth flow from scratch in a new project

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: set up Google and Apple sign-in with Supabase profile sync

AGENT
  1. 1Checks existing files in src/lib/firebase/, src/hooks/, src/middleware.ts, and .env.example
  2. 2Creates Firebase client and admin SDK initializers if missing
  3. 3Generates useAuth hook with signInWithGoogle and signInWithApple methods
  4. 4Creates /api/auth/sync route that verifies the Firebase token and upserts a Supabase profile
  5. 5Generates login page component and lists manual Firebase Console steps
OUTPUT

Auth hooks, sync API route, and login page created; user instructed to enable providers in Firebase Console and add required env vars

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

Firebase project with Authentication enabledNEXT_PUBLIC_FIREBASE_API_KEY and related Firebase client env varsFirebase Admin SDK service account credentials (FIREBASE_ADMIN_PRIVATE_KEY, FIREBASE_ADMIN_CLIENT_EMAIL, FIREBASE_ADMIN_PROJECT_ID)NEXT_PUBLIC_SUPABASE_URL environment variableSUPABASE_SERVICE_ROLE_KEY environment variable