socialiteproviders/manager
Extends Laravel Socialite with a manager to add new OAuth providers, override existing ones, and defer provider loading until needed. Supports Lumen, optional stateless mode, dynamic config overrides, and reads credentials directly from .env.
SocialiteWasCalled) for dynamic provider extension, enabling runtime overrides (e.g., A/B testing, tenant-specific auth)..env-based credentials with runtime overrides, simplifying multi-tenant or dynamic environments (e.g., per-tenant OAuth clients).AbstractProvider), accelerating development for niche auth flows (e.g., Twitter, Mastodon).| Risk Area | Mitigation Strategy |
|---|---|
| Dependency Bloat | Package adds ~100KB; justify with developer velocity vs. custom implementations. |
| Event System Complexity | Requires understanding of SocialiteWasCalled; document provider registration patterns. |
| Provider Compatibility | Test with target providers (e.g., WeChat, VK) early; use community-maintained packages where possible. |
| Laravel Version Lock | Drop PHP <8.1/Laravel <6; align with team’s tech stack maturity. |
| Security Risks | Audit third-party providers (e.g., MIT-licensed but community-maintained); use runtime config validation. |
| Performance Overhead | Benchmark deferred loading vs. eager loading; monitor memory usage in high-traffic APIs. |
.env files (standard) and runtime overrides (e.g., per-tenant credentials).SocialiteWasCalled) in EventServiceProvider..env and provider classes (extend AbstractProvider).| Component | Compatibility Notes |
|---|---|
| Laravel | 6.x–12.x (tested); drop PHP <8.1. |
| Lumen | First-class support; stateless mode recommended. |
| PHP | 8.1–8.5 (as of v4.9.2); align with team’s PHP version. |
| Socialite | v5.2+ (required); ensure no breaking changes in future Socialite updates. |
| Providers | Community providers (e.g., socialiteproviders/wechat) or custom implementations. |
| Databases | No direct DB dependencies; stores user data in your app’s auth system (e.g., users table). |
| Caching | Supports stateless mode; cache provider configs if runtime overrides are rare. |
composer require socialiteproviders/manager.socialiteproviders/wechat) quarterly..env) for credentials to avoid hardcoding.client_id).How can I help you explore Laravel packages today?