Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
Version History
- 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.
User asks: set up Google and Apple sign-in with Supabase profile sync
- 1Checks existing files in src/lib/firebase/, src/hooks/, src/middleware.ts, and .env.example
- 2Creates Firebase client and admin SDK initializers if missing
- 3Generates useAuth hook with signInWithGoogle and signInWithApple methods
- 4Creates /api/auth/sync route that verifies the Firebase token and upserts a Supabase profile
- 5Generates login page component and lists manual Firebase Console steps
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.