PHPackages                             sameoldnick/laravel-oauth - 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. sameoldnick/laravel-oauth

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

sameoldnick/laravel-oauth
=========================

Integrates Laravel Socialite with your app’s auth.

v1.1.0(3w ago)078MITPHPPHP ^8.4CI passing

Since Jun 4Pushed 2w agoCompare

[ Source](https://github.com/SameOldNick/laravel-oauth)[ Packagist](https://packagist.org/packages/sameoldnick/laravel-oauth)[ Docs](https://github.com/sameoldnick/laravel-oauth)[ RSS](/packages/sameoldnick-laravel-oauth/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (14)Versions (3)Used By (0)

Laravel OAuth
=============

[](#laravel-oauth)

[![codecov](https://camo.githubusercontent.com/37e88609c8a0f79582223d5211129dac379ade27726c6684a216ad96a7525b14/68747470733a2f2f636f6465636f762e696f2f67682f53616d654f6c644e69636b2f6c61726176656c2d6f617574682f67726170682f62616467652e7376673f746f6b656e3d6b6e4564673951305469)](https://codecov.io/gh/SameOldNick/laravel-oauth)[![Packagist Downloads](https://camo.githubusercontent.com/55376437d8c28db39792066509ea11ef4d7aed51fed1291c253042f3760a9c65/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73616d656f6c646e69636b2f6c61726176656c2d6f61757468)](https://packagist.org/packages/sameoldnick/laravel-oauth)[![Packagist Version](https://camo.githubusercontent.com/f6e8a0aaa49fd18e7857ee3ef106215c95d674bb92ba46f0c42b38e387ddb80c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616d656f6c646e69636b2f6c61726176656c2d6f61757468)](https://packagist.org/packages/sameoldnick/laravel-oauth)[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/92ce83d82086b390a661cee55cedabc20c8f3218f82fcfc3cefeb4057549f396/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73616d656f6c646e69636b2f6c61726176656c2d6f617574682f74657374732e796d6c)](https://github.com/SameOldNick/laravel-oauth/actions/workflows/tests.yml)

Integrates Laravel Socialite with your app's authentication flow, including account linking, account relinking, registration/login gate checks, and stack-specific response handling.

Features
--------

[](#features)

- Built-in OAuth flow routes and handlers
- Built-in clients: GitHub, Google, Twitter
- Uses `config/oauth.php` (instead of `config/services.php`) for provider credentials
- Account linking table + model (`oauth_providers`)
- Install command to scaffold app-owned OAuth services and responses
- Contracts for full customization (gate checks, user resolver, registrar, response types)
- Events for connected/disconnected/signed-in lifecycle hooks
- Testing helpers via `OAuth::fake()`

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

[](#requirements)

- PHP 8.4+
- Laravel 11.x, 12.x, or 13.x
- `laravel/socialite` 5.27+

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

[](#installation)

1. Install the package:

```
composer require sameoldnick/laravel-oauth
```

2. Publish config and migrations:

```
php artisan vendor:publish --tag=oauth-config
php artisan vendor:publish --tag=oauth-migrations
```

3. Run migrations:

```
php artisan migrate
```

4. Scaffold app-level OAuth services and responses:

```
php artisan oauth:install --stack=fortify
```

5. Add provider credentials to `.env` (examples):

```
GITHUB_OAUTH_ENABLED=true
GITHUB_CLIENT_ID=...
GITHUB_CLIENT_SECRET=...
GITHUB_REDIRECT_URI="${APP_URL}/oauth/callback/github"

GOOGLE_OAUTH_ENABLED=true
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
GOOGLE_REDIRECT_URI="${APP_URL}/oauth/callback/google"

TWITTER_OAUTH_ENABLED=true
TWITTER_CLIENT_ID=...
TWITTER_CLIENT_SECRET=...
TWITTER_REDIRECT_URI="${APP_URL}/oauth/callback/twitter"

# See the 'config/oauth.php' file for more environment variables.
```

6. Ensure the generated app provider is registered.

The install command attempts to add `App\Providers\OAuthServiceProvider::class` to `bootstrap/providers.php`. If not added automatically, register it manually.

Wiki
----

[](#wiki)

All extended documentation lives in the [wiki](https://github.com/SameOldNick/laravel-oauth/wiki).

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance96

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

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

Total

2

Last Release

21d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ffbb43bf329bdf64328633153be67c2057ae694839c1b109c74a80b8184aec4?d=identicon)[SameOldNick](/maintainers/SameOldNick)

---

Top Contributors

[![SameOldNick](https://avatars.githubusercontent.com/u/110937288?v=4)](https://github.com/SameOldNick "SameOldNick (92 commits)")

---

Tags

laravellaravel-oauthSameOldNick

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/sameoldnick-laravel-oauth/health.svg)

```
[![Health](https://phpackages.com/badges/sameoldnick-laravel-oauth/health.svg)](https://phpackages.com/packages/sameoldnick-laravel-oauth)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.5k](/packages/spatie-laravel-permission)[dutchcodingcompany/filament-socialite

Social login for Filament through Laravel Socialite

2191.1M11](/packages/dutchcodingcompany-filament-socialite)[spatie/laravel-passkeys

Use passkeys in your Laravel app

472890.7k40](/packages/spatie-laravel-passkeys)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.8k](/packages/rawilk-profile-filament-plugin)[andrewdwallo/filament-companies

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

35156.4k2](/packages/andrewdwallo-filament-companies)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1613.3k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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