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
| Variable | Description |
|---|
PUBLIC_FIREBASE_API_KEY | Firebase web API key |
PUBLIC_FIREBASE_AUTH_DOMAIN | Firebase auth domain (e.g., myapp.firebaseapp.com) |
PUBLIC_FIREBASE_PROJECT_ID | Firebase project ID |
Supported Providers
- OAuth: Google, Facebook, Twitter, Apple, GitHub
- Password: Email/Password
- Magic Link: Email OTP
- Passkey: WebAuthn passkeys
Capabilities
| Feature | Supported |
|---|
| Authentication | ✓ |
| Data API | — |
| RPC | — |
| Logging | — |
| Magic Link | ✓ |
| Passkey | ✓ |