
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@caleblawson/auth-firebase
Advanced tools
A Firebase authentication integration package for Mastra applications. This package provides seamless integration with Firebase Authentication and Firestore for user authentication and authorization.
npm install @mastra/auth-firebase
# or
yarn add @mastra/auth-firebase
# or
pnpm add @mastra/auth-firebase
import { Mastra } from '@mastra/core';
import { MastraAuthFirebase } from '@mastra/auth-firebase';
// Initialize with default configuration
const auth = new MastraAuthFirebase();
// Or with custom options
const auth = new MastraAuthFirebase({
  serviceAccount: 'path/to/service-account.json',
  databaseId: 'your-database-id',
});
// Enable auth in Mastra
const mastra = new Mastra({
  ...
  server: {
    experimental_auth: auth,
  },
});
The package can be configured through constructor options or environment variables:
serviceAccount: Path to Firebase service account JSON filedatabaseId: Firestore database IDFIREBASE_SERVICE_ACCOUNT: Path to Firebase service account JSON fileFIRESTORE_DATABASE_ID or FIREBASE_DATABASE_ID: Firestore database IDThe package uses Firestore to manage user access. It expects a collection named user_access with documents keyed by user UIDs. The presence of a document in this collection determines whether a user is authorized.
Elastic-2.0
FAQs
Mastra Firebase Auth integration
We found that @caleblawson/auth-firebase demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.