कंटेंट पर जाएँ
TakoAPI
स्किल्स पर वापस

firebase-auth-setup

guifav द्वारा

Web & Frontend Development
443clawskills.sh द्वारा बताए गए डाउनलोड
0व्यूज़
0 लाइकइस स्किल को लाइक करने के लिए साइन इन करें
—अभी तक कोई रेटिंग नहीं
आपकी रेटिंग

संक्षिप्त

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

विवरण

यह स्किल क्या करती है

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.

इसे कब इस्तेमाल करें

  • 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

उदाहरण वर्कफ़्लो

इनपुट

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

एजेंट
  1. 1

    Checks existing files in src/lib/firebase/, src/hooks/, src/middleware.ts, and .env.example

  2. 2

    Creates Firebase client and admin SDK initializers if missing

  3. 3

    Generates useAuth hook with signInWithGoogle and signInWithApple methods

  4. 4

    Creates /api/auth/sync route that verifies the Firebase token and upserts a Supabase profile

  5. 5

    Generates 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

आवश्यकताएँ

  • Firebase project with Authentication enabled
  • NEXT_PUBLIC_FIREBASE_API_KEY and related Firebase client env vars
  • Firebase Admin SDK service account credentials (FIREBASE_ADMIN_PRIVATE_KEY, FIREBASE_ADMIN_CLIENT_EMAIL, FIREBASE_ADMIN_PROJECT_ID)
  • NEXT_PUBLIC_SUPABASE_URL environment variable
  • SUPABASE_SERVICE_ROLE_KEY environment variable

इंस्टॉलेशन

clawhub install guifav/firebase-auth-setup

CLI कमांड चलाएँ, या प्रॉम्प्ट को Claude Code, Cursor, Codex या जो भी कोडिंग एजेंट आप इस्तेमाल करते हैं उसमें पेस्ट करें।

लिंक