Firebase Adapter

Authenticate users using Firebase Auth with OAuth and password-based authentication.

Installation

npm install @kavach/adapter-firebase

Configuration

export default {
  adapter: 'firebase',
  providers: [
    { name: 'google', label: 'Continue with Google' },
    { name: 'password', label: 'Email/Password' }
  ],
  env: {
    apiKey: 'PUBLIC_FIREBASE_API_KEY',
    authDomain: 'PUBLIC_FIREBASE_AUTH_DOMAIN',
    projectId: 'PUBLIC_FIREBASE_PROJECT_ID'
  }
}

Environment Variables

VariableDescription
PUBLIC_FIREBASE_API_KEYFirebase web API key
PUBLIC_FIREBASE_AUTH_DOMAINFirebase auth domain (e.g., myapp.firebaseapp.com)
PUBLIC_FIREBASE_PROJECT_IDFirebase project ID

Supported Providers

  • OAuth: Google, Facebook, Twitter, Apple, GitHub
  • Password: Email/Password
  • Magic Link: Email OTP
  • Passkey: WebAuthn passkeys

Capabilities

FeatureSupported
Authentication
Data API
RPC
Logging
Magic Link
Passkey

Next Steps

Kavach — Authentication made simple llms.txt