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

Technical Evaluation

Architecture fit: Excellent for Laravel due to PSR-6 cache compatibility, Composer-based installation, and service container integration. The library’s decoupled design aligns with Laravel’s dependency injection patterns. Laravel’s .env and config system handles Firebase credentials without code changes.
Integration feasibility: High. Minimal setup required—install via Composer, configure credentials in .env, and inject CustomTokenGenerator or IdTokenVerifier via Laravel’s service container. No framework-specific bootstrapping needed.
Technical risk: Moderate-to-elevated on versions before 5.6.2; reduced after upgrading. Release 5.6.2 is a security-hardening patch: whitespace-only FIREBASE_AUTH_EMULATOR_HOST values no longer enable emulator mode or skip signature verification for ID tokens and session cookies. This matters in Laravel because env vars can be introduced via .env, CI/CD, Docker/Kubernetes, or secret managers with accidental whitespace. The release appears to be a patch with no indicated breaking API changes, so a Composer update to 5.6.2 should be prioritized. Existing metadata anomalies—Packagist “Dependents: 0” despite high indirect usage via firebase-php, and a future-dated release—remain low-confidence signals and should not override the security relevance of 5.6.2.
Key questions: Do any deployed environments have FIREBASE_AUTH_EMULATOR_HOST set to whitespace-only or otherwise non-empty by accident? Do we validate auth-related env vars at boot or in CI/CD? Do we have a test that fails if emulator mode is enabled outside local/test? Should we audit auth logs for anomalous token acceptance around deployments using pre-5.6.2 versions?

Integration Approach

Stack fit: Strong. The package remains compatible with Laravel’s Composer workflow, service container, .env configuration, and PSR-6 cache abstractions. No architectural change is required for 5.6.2.
Migration path: Upgrade to 5.6.2 via Composer as a patch release. Audit all .env, CI/CD variables, Docker/Kubernetes manifests, and secret-manager entries for FIREBASE_AUTH_EMULATOR_HOST; remove production values and ensure local emulator usage is explicit and intentional. Add deployment-time validation to reject whitespace-only auth env vars.
Compatibility: No breaking changes are indicated in 5.6.2. Verify the Laravel/PHP version constraints and transitive firebase-php dependency remain satisfied after updating composer.lock.
Sequencing: 1) Update dependency to 5.6.2 in a branch; 2) audit auth env configuration across environments; 3) add or update config validation and auth tests; 4) validate local emulator and production-like auth flows in staging; 5) deploy to non-production; 6) deploy to production with monitoring; 7) document the env-hygiene requirement.

Operational Impact

Maintenance: Low ongoing maintenance; 5.6.2 is a routine patch upgrade with security relevance. The main operational task is configuration hygiene around FIREBASE_AUTH_EMULATOR_HOST.
Support: Treat 5.6.2 as a prioritized security patch. Support runbooks should document that emulator mode must only be enabled intentionally, and that whitespace-only env values are invalid.
Scaling: No scaling impact. The fix does not change runtime architecture or capacity characteristics.
Failure modes: Pre-5.6.2, a whitespace-only emulator host could incorrectly enable emulator mode and skip signature verification for ID tokens and session cookies, creating a fail-open auth risk. After 5.6.2, the package is expected to fail closed for this case. Residual risk remains if a real emulator host is deliberately or accidentally configured in production; guardrails should prevent that. Local developers who relied on whitespace-only values to activate the emulator must now set an explicit emulator host.
Ramp-up: Minimal for engineering teams already using the package. TPM should coordinate a short upgrade ticket, environment-variable audit, CI validation, and release communication so teams understand the security rationale and local emulator setup change.

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings