Weave Code
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

Manager Laravel Package

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.

View on GitHub
Deep Wiki
Context7

SocialiteProviders Manager extends Laravel Socialite with a lightweight manager that lets you add, replace, and configure OAuth providers cleanly. Providers are registered via the manager and instantiated only when Socialite is called, making integration flexible for Laravel and Lumen apps.

Use it to load providers from the SocialiteProviders ecosystem (or your own), while keeping configuration simple—including direct .env reads and runtime overrides.

  • Add new providers or override existing Socialite drivers
  • Deferred instantiation for faster boot and cleaner registration
  • Toggle stateless() per provider (true/false)
  • Dynamic config overrides at runtime
  • Lumen-friendly setup with minimal ceremony
Frequently asked questions about Manager
How do I install SocialiteProviders/Manager in a Laravel project?
Run `composer require socialiteproviders/manager` to install the package. No additional configuration is needed for basic usage, but you’ll need to register providers via an event listener or service provider. Follow the [README’s setup guide](https://github.com/SocialiteProviders/Manager) for detailed steps.
Does this package support Lumen, and how does it differ from Laravel?
Yes, it fully supports Lumen. The key difference is that Lumen lacks Laravel’s service container bootstrapping, so you’ll need to manually register the manager via a service provider or bootstrapped file. Stateless mode is also more relevant for Lumen due to its stateless nature.
Can I override built-in Socialite providers like GitHub or Google?
Absolutely. The manager allows you to override any default or third-party provider by registering a custom class that extends `SocialiteProviders\Manager\SocialiteProviders\AbstractProvider`. This is useful for adding custom logic or fixing deprecated endpoints.
How does deferred instantiation improve performance in Laravel?
Deferred instantiation loads providers only when Socialite is called, reducing memory usage and cold-start latency—critical for APIs or serverless environments like Vapor. This is especially beneficial for Lumen or high-traffic apps where eager loading would bloat memory.
What Laravel versions are supported, and is there backward compatibility?
The package supports Laravel 6 through 12 and Lumen. It follows SemVer, so minor updates include backward-compatible features. Always check the [release notes](https://github.com/SocialiteProviders/Manager/releases) for version-specific changes before upgrading.
How do I dynamically override provider configurations at runtime?
Use the `SocialiteProviders\Manager\SocialiteProviders\Manager::extend()` method or Laravel’s `config()` overrides. For example, you can load tenant-specific credentials from a database or cache during runtime, enabling multi-tenant or feature-flagged auth flows.
Are there any security risks with runtime config overrides?
Yes, runtime overrides can expose credentials if not handled carefully. Always validate and sanitize dynamic configs, and avoid hardcoding sensitive data. Use Laravel’s `config()` caching or environment-based overrides to mitigate risks.
How do I handle OAuth1 providers like Twitter in this package?
The package includes abstract base classes for both OAuth1 and OAuth2. For Twitter, use the `SocialiteProviders\Twitter\TwitterExtender` or create a custom provider extending `AbstractProvider`. Follow the [SocialiteProviders.com](https://socialiteproviders.com/) guide for OAuth1-specific setup.
Can I use this package with serverless or edge deployments like AWS Lambda?
Yes, the stateless mode (`stateless(true)`) is optimized for serverless. Ensure your providers support stateless flows (e.g., OAuth2 PKCE) and configure session drivers like Redis or database for token storage if needed.
What’s the best way to test custom providers in this package?
Use PHPUnit or Pest to mock the `Socialite` facade and test provider responses. The package integrates with Laravel’s testing helpers, so you can assert user data or errors. Example: `Socialite::shouldReceive('driver')->andReturn($mockProvider)->once();`
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport