userfriendly/social-user-bundle
Symfony bundle that integrates social user accounts and OAuth providers into your app, letting visitors register and log in with existing social profiles while keeping authentication and user data consistent. Part of the Userfriendly ecosystem.
This is a Symfony 2 bundle, not a Laravel package. There is no service provider, no facade, and no way to install it into a Laravel app without effectively reimplementing Symfony's bundle/kernel/security stack. Day-to-day leverage for a Laravel developer is therefore indirect: read it as a reference implementation of the "OAuth + password login in one user table" pattern, and use laravel/socialite + laravel/fortify (or laravel/ui) for the real thing.
If you inherit a legacy Symfony 2 app that already uses it, the minimum path is:
composer.json constraints (this bundle's last release was 2014-11-04; expect Symfony ~2.x and PHP 5.x).composer require userfriendly/social-user-bundle using the era-appropriate Composer/PHP.app/AppKernel.php and import its routing in app/config/routing.yml.client_id, client_secret, redirect_uri) in app/config/config.yml.form_login and OAuth firewalls in app/config/security.yml.User entity from the bundle's base model.Where to look first, in order:
README.md — setup and the canonical config sample.DependencyInjection/Configuration.php — the authoritative config tree; the README lags it.Resources/config/services.* — what is actually wired and which ids you can override.Security/ and Entity/ (or Model/) — the auth flow and the user contract.Tests/, if present — the fastest way to see expected provider responses.First use case: add a "Sign in with GitHub" button next to the existing username/password form, and create a local user on first OAuth login. That is the bundle's whole reason to exist; everything else is variation on it.
form_login plus the bundle's OAuth entry point (or two firewalls with a shared user provider). Keep the OAuth firewall after the form-login firewall; ordering in security.yml decides which listener wins.User implements the bundle's user interface and extends its base class. Store the provider name and provider user id as separate columns (e.g. oauth_provider, oauth_id) — not just the email — so one account can link multiple providers and re-linking is idempotent.app/Resources/. Do that; the repo is archived and you will never get upstream fixes.symfony/security-bundle beyond 2.x. Composer will fight you the moment anything modern is in the tree. Do not try to bridge it into a Laravel app; port the pattern instead.state parameter / CSRF. Older bundles often omit or under-validate the OAuth state parameter. Verify it yourself; this is a real CSRF vector in social login.config.yml, the provider console, and any proxy/X-Forwarded-* rewrite.app/logs/dev.log; firewall misordering is invisible until you look at the listener chain.laravel/socialite for the provider dance, laravel/fortify for the password/session side, a social_accounts table (user_id, provider, provider_id, token) for linking, and a SocialiteWasCalled/login event listener for first-login provisioning. That mapping is the only thing this bundle is still good for.How can I help you explore Laravel packages today?