firestore-better-auth

Configure Better Auth with Firestore via Firebase Admin SDK.

9|3|Updated Oct 29, 2025
One-click install
npx skills add https://github.com/yultyyev/better-auth-firestore --skill firestore-better-auth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: firestore-better-auth
Source: https://github.com/yultyyev/better-auth-firestore/tree/main/skills/firestore-better-auth
Command: npx skills add https://github.com/yultyyev/better-auth-firestore --skill firestore-better-auth

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you set up and troubleshoot Better Auth with Firestore so user, session, account, and verification-token data can be stored reliably in Firebase-backed applications.

Core Features & Use Cases

  • Firestore Adapter Setup: Configure Better Auth to use Firestore through the Firebase Admin SDK.
  • Migration Support: Move from the Auth.js or NextAuth Firebase adapter without changing your data shape.
  • Production Troubleshooting: Resolve common issues such as Firestore index errors, environment variable formatting, emulator usage, and Node runtime limitations.
  • Use Case: A Next.js team can adopt Better Auth while keeping their existing Firestore collections and deploying safely on Node-based serverless infrastructure.

Quick Start

Ask for a minimal Better Auth configuration that uses Firestore with firebase-admin and includes the correct private-key newline handling.

Frequently Asked Questions about firestore-better-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Better Auth to use Firestore as a database adapter?

To configure Better Auth with Firestore, you use the Firebase Admin SDK to map user, session, account, and verification-token data to Firestore collections. This Skill provides the minimal configuration setup and handles correct private-key newline formatting.

Can I migrate from NextAuth Firebase adapter to Better Auth without changing my data shape?

Yes, you can migrate from Auth.js or NextAuth Firebase adapter to Better Auth without changing your data shape. This Skill supports migration workflows so your existing Firestore collections remain intact during the transition.

Why does my Better Auth Firestore setup fail with environment variable formatting errors?

Firestore setup failures often stem from incorrect private-key newline normalization in your environment variables. This Skill addresses production troubleshooting for environment variable formatting, Firestore index errors, and Node.js runtime limitations.

Does Better Auth work with Firebase Admin SDK on Node.js serverless infrastructure?

Better Auth works with Firebase Admin SDK on Node.js serverless infrastructure. This Skill ensures correct Firestore initialization and Node.js runtime compatibility so Next.js teams can deploy Better Auth safely on serverless environments.

What is the best way to store Better Auth user and session data in Firestore?

The best way to store Better Auth user and session data in Firestore is through the Firebase Admin SDK database adapter. This Skill configures collection mapping for user, session, account, and verification-token storage to ensure reliable Firebase-backed application data.