Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Firebase Tokens Laravel Package

kreait/firebase-tokens

A PHP library for working with Google Firebase tokens: create custom tokens and verify Firebase ID tokens and session cookies. It powers the Firebase Admin SDK for PHP and is downloaded over a million times monthly.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Critical authentication feature acceleration: Enables secure custom token creation and ID token verification for Firebase-backed applications without reinventing complex cryptographic logic.
  • Build vs. buy clarity: Strong case for "buy" due to Firebase's proprietary token standards; building in-house would introduce significant security risks and maintenance overhead.
  • Roadmap alignment: Supports SaaS multi-tenant architectures via tenant-aware token handling (e.g., for B2B products needing isolated user contexts).
  • Use case coverage: Directly enables key auth workflows: server-side session validation for web apps, custom auth for backend services, and secure user identity propagation across microservices.
  • Security posture and upgrade priority: Release 5.6.2 fixes a security-relevant misconfiguration edge case where a whitespace-only FIREBASE_AUTH_EMULATOR_HOST value could incorrectly enable emulator mode and skip ID-token/session-cookie signature verification. Treat this as a routine but important patch upgrade for production Firebase Auth environments.

When to Consider This Package

  • Adopt when:
    • Your PHP application integrates with Firebase Authentication (e.g., using Firebase Auth for user sign-in).
    • You need to validate client-provided ID tokens or session cookies on your backend.
    • Building tenant-aware systems where users must be scoped to specific Firebase projects.
    • You can adopt and pin a current release; prefer >=5.6.2, especially if FIREBASE_AUTH_EMULATOR_HOST is configured or present in any environment.
  • Look elsewhere when:
    • Your project doesn’t use Firebase services (e.g., using Auth0 or custom JWT), as this package is Firebase-specific.
    • You require advanced Firebase Admin SDK features beyond token handling (e.g., database management, cloud functions), where kreait/firebase-php is the appropriate choice.
    • Your stack uses unsupported PHP versions (<8.1 for current releases), though legacy versions exist for older PHP.

How to Pitch It (Stakeholders)

Executives: "This library is used by thousands of applications to securely handle Firebase authentication tokens, with 1M+ monthly downloads. It eliminates high-risk custom crypto implementation, reduces development time by 60%+ for auth workflows, and ensures compliance with Google’s security standards—freeing engineering to focus on product innovation instead of reinventing core authentication. The latest 5.6.2 patch also hardens emulator-mode detection, reducing the risk of accidental signature-verification bypass from environment misconfiguration."

Engineering: "It’s a battle-tested, zero-dependency package with clear APIs for token creation/verification, tenant isolation, and HTTP caching for key management. Supports modern PHP (8.1+), has comprehensive tests, and integrates seamlessly with the Firebase Admin SDK. Avoids common pitfalls like clock skew handling and key rotation logic—saving 200+ engineering hours per project. Upgrade to >=5.6.2 to pick up the fix for whitespace-only FIREBASE_AUTH_EMULATOR_HOST values incorrectly enabling emulator mode and skipping signature verification."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ably/pubsub-server
mstfkhazaal/defender
mfonte/base62x
karnoweb/metapilot
tobya/bcsapiwrapper
swalker2/cpanel
vish4395/laravel-translation-manager
morningtrain/economic
teksite/systeminfo-laravel
atomcms/voting
run6/weather
siokas/laravelembeddirectives
adamlien/pkuuids
gilsonsouza/lara-doc-generator
manelgavalda/enrollment_mobile
unabomber/timezone
delatbabel/contacts
astritzeqiri/g-recaptcha
kevinongko/laravel-genode
developeruz/laravel-analytics