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. lornequinn/social-auth

ActiveLibrary

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

Config-driven Socialite OAuth client for Laravel

v1.0.0(1mo ago)02↑1400%MITPHPPHP ^8.2

Since Apr 8Pushed 1mo 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 4w ago

READMEChangelogDependencies (7)Versions (3)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 86% of packages

Maintenance94

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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 ~0 days

Total

2

Last Release

32d ago

Major Versions

v0.1.0 → v1.0.02026-04-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/847f49e2e3d6600f45ca65d2a1e0e70811fccac30a2bb71f602ffe6e2015845f?d=identicon)[lornequinn](/maintainers/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.

42442.0M544](/packages/socialiteproviders-manager)[andrewdwallo/filament-companies

A comprehensive Laravel authentication and authorization system designed for Filament, focusing on multi-tenant company management.

34450.0k2](/packages/andrewdwallo-filament-companies)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

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

PHPackages © 2026

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