SocialiteProviders: Google
Google OAuth2 provider for Laravel Socialite, part of the community SocialiteProviders collection
Repository Health
Technical Analysis
socialiteproviders/google is the Google OAuth2 provider for Laravel Socialite, distributed as one package within the community-maintained SocialiteProviders/Providers monorepo — a single repository housing OAuth1/OAuth2 provider implementations for dozens of services, individually installable via Composer.
It plugs into Socialite’s SocialiteWasCalled event system to register a google driver, letting a Laravel app authenticate users via Google without maintaining custom OAuth2 handshake code. It returns a normalized user object (id, nickname, name, email, avatar) consistent with Socialite’s other drivers.
What You Get
- A ready-to-use
googleSocialite driver requiring only client ID/secret/redirect config - A normalized OAuth2 user object (id, nickname, name, email, avatar)
- Event-based registration (
SocialiteWasCalled) matching Laravel 10/11+ conventions - Shared reliance on
socialiteproviders/managerfor consistent provider boilerplate across all SocialiteProviders packages
Common Use Cases
- Adding ‘Sign in with Google’ to a Laravel application without hand-rolling OAuth2
- Consolidating multiple social login providers (Google, GitHub, Microsoft, etc.) under one consistent Socialite-based API
- Migrating from a deprecated per-service provider package (e.g. the old Google+ provider) to the actively maintained Google provider
Under The Hood
Architecture - The Google provider lives at src/Google/ inside the SocialiteProviders/Providers monorepo, consisting of a Provider.php (extends Socialite’s abstract OAuth2 provider with Google’s authorize/token/user-info endpoints) and a GoogleExtendSocialite.php listener that registers the driver when Laravel dispatches SocialiteWasCalled. This mirrors the structure of the other 270+ provider directories in the same repo, all sharing the top-level socialiteproviders/manager dependency for event wiring and base provider behavior. Tech Stack - PHP 8.0+ (repo-wide toolchain targets PHP 8.5), built on socialiteproviders/manager ^4.4 and, at the monorepo root, league/oauth1-client for the OAuth1-based sibling providers; dev tooling includes Laravel Pint and php-parallel-lint, run repo-wide via GitHub Actions. Code Quality - Individual provider directories are small (a provider class plus an extend-listener) and rely on the shared manager package’s tested OAuth2 base class rather than duplicating request/token-exchange logic; the monorepo’s per-package composer.json split lets each of the 270+ providers be required independently while sharing one CI/lint configuration. API Design - Usage is a two-step pattern common to every SocialiteProviders package: register the event listener once, then call Socialite::driver('google')->redirect() as if it were a Laravel built-in driver, keeping the API surface identical across all supported OAuth providers and minimizing the learning curve for teams already using Socialite.
Used by 2 apps in this directory
Coolify
Devops · Hosting Control Panel
Open-source self-hosted PaaS — deploy apps, databases and 280+ services on your own servers with no vendor lock-in
Leantime
Productivity · Project Management · Collaboration
Project management built for ADHD, autism, and dyslexia — simple as Trello, powerful as Jira