PHPackages                             lornequinn/social-auth - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. lornequinn/social-auth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

lornequinn/social-auth
======================

Config-driven Socialite OAuth client for Laravel

v1.0.1(1mo ago)011↓88.9%MITPHPPHP ^8.2

Since Apr 8Pushed 2mo agoCompare

[ Source](https://github.com/lornequinn/social-auth)[ Packagist](https://packagist.org/packages/lornequinn/social-auth)[ RSS](/packages/lornequinn-social-auth/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (14)Versions (4)Used By (0)

Social Auth
===========

[](#social-auth)

Config-driven Socialite OAuth client for Laravel. Add OAuth login via env vars — no boilerplate.

Supports standard Socialite providers (Google, GitHub, Facebook, etc.) and custom OAuth2 servers with a generic driver.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11, 12, or 13

Installation
------------

[](#installation)

```
composer require lornequinn/social-auth
```

The service provider is auto-discovered.

Publish the config (optional):

```
php artisan vendor:publish --tag=social-auth-config
```

Configuration
-------------

[](#configuration)

Everything is driven by env vars. No config files to edit for the common case.

### Standard Providers

[](#standard-providers)

For providers with built-in Socialite drivers (Google, GitHub, Facebook, etc.):

```
LQ_SOCIAL_PROVIDERS=google,github

LQ_SOCIAL_GOOGLE_CLIENT_ID=your-google-client-id
LQ_SOCIAL_GOOGLE_CLIENT_SECRET=your-google-client-secret

LQ_SOCIAL_GITHUB_CLIENT_ID=your-github-client-id
LQ_SOCIAL_GITHUB_CLIENT_SECRET=your-github-client-secret
```

### Custom OAuth2 Providers

[](#custom-oauth2-providers)

For any OAuth2 server (e.g. a Laravel Passport instance, a corporate SSO, or any other OAuth2-compliant server):

```
LQ_SOCIAL_PROVIDERS=myapp

LQ_SOCIAL_MYAPP_CLIENT_ID=your-client-id
LQ_SOCIAL_MYAPP_CLIENT_SECRET=your-client-secret
LQ_SOCIAL_MYAPP_AUTH_URL=https://auth.example.com/oauth/authorize
LQ_SOCIAL_MYAPP_TOKEN_URL=https://auth.example.com/oauth/token
LQ_SOCIAL_MYAPP_USER_URL=https://auth.example.com/api/user
```

A provider is treated as custom when `AUTH_URL`, `TOKEN_URL`, and `USER_URL` are all set.

### Mixed

[](#mixed)

Standard and custom providers can be combined:

```
LQ_SOCIAL_PROVIDERS=myapp,google
```

### Additional Options

[](#additional-options)

```
# Route prefix (default: auth/social)
LQ_SOCIAL_ROUTE_PREFIX=auth/social

# User model (default: App\Models\User)
LQ_SOCIAL_USER_MODEL=App\Models\User

# Column to match existing users (default: email)
LQ_SOCIAL_MATCH_BY=email

# Redirect after login (default: /dashboard)
LQ_SOCIAL_REDIRECT_TO=/dashboard

# Scopes (comma-separated, per provider)
LQ_SOCIAL_GOOGLE_SCOPES=openid,profile,email
```

Routes
------

[](#routes)

Routes are registered automatically for each configured provider:

RouteNamePurpose`GET /{prefix}/{provider}/redirect``social-auth.redirect`Redirect to OAuth provider`GET /{prefix}/{provider}/callback``social-auth.callback`Handle OAuth callbackWith the default prefix, Google login would be at `/auth/social/google/redirect`.

Generate URLs in your templates:

```
Login with Google
```

User Resolution
---------------

[](#user-resolution)

On callback, the package will:

1. Fetch the authenticated user from the OAuth provider
2. Find or create a local user by matching the configured column (default: `email`)
3. Log the user in with `remember: true`
4. Redirect to the intended URL (or the configured `redirect_to`)

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance88

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~17 days

Total

3

Last Release

42d ago

Major Versions

v0.1.0 → v1.0.02026-04-08

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/265405724?v=4)[lornequinn](/maintainers/lornequinn)[@lornequinn](https://github.com/lornequinn)

---

Top Contributors

[![lornequinn](https://avatars.githubusercontent.com/u/265405724?v=4)](https://github.com/lornequinn "lornequinn (5 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/lornequinn-social-auth/health.svg)

```
[![Health](https://phpackages.com/badges/lornequinn-social-auth/health.svg)](https://phpackages.com/packages/lornequinn-social-auth)
```

###  Alternatives

[socialiteproviders/manager

Easily add new or override built-in providers in Laravel Socialite.

42645.6M575](/packages/socialiteproviders-manager)[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5742.2M17](/packages/directorytree-ldaprecord-laravel)[illuminate/auth

The Illuminate Auth package.

9327.9M1.2k](/packages/illuminate-auth)[genealabs/laravel-socialiter

Automatically manage user persistence and resolution for any Laravel Socialite provider.

134421.5k](/packages/genealabs-laravel-socialiter)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1517.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
