PHPackages                             freebuu/socialite-local - 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. freebuu/socialite-local

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

freebuu/socialite-local
=======================

Socialite provider for local development

v1.2.0(4mo ago)15243MITPHPPHP ^7.4 || ^8.0

Since Sep 28Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/freebuu/socialite-local)[ Packagist](https://packagist.org/packages/freebuu/socialite-local)[ RSS](/packages/freebuu-socialite-local/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (7)Used By (0)

Socialite Local
===============

[](#socialite-local)

Introduction
------------

[](#introduction)

The library is used to simulate an OAuth server locally. All calls to the Socialite are intercepted and replaced by a local driver. Only installation is enough to use - no additional configuration in most cases.

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

[](#installation)

- Require Socialite v4 or v5 and OAuth2 provider (OAuth1 providers not supported for now)
- Use Composer to install: `composer require --dev freebuu/socialite-local`

**⚠️ WARNING: install this package only as dev dependency due to security reasons.**

By default, the package is disabled in production (when `APP_ENV=production`). You can explicity control if the interceptor is enabled by setting `SOCIALITE_LOCAL_ENABLED=true` (or `false`) in your environment file.

Usage
-----

[](#usage)

Just use socialite as usual:

```
Socialite::driver('github')->redirect()
```

You will be redirected to local page - where you can set email, username, id, etc. for subject. After submitting form you can get socialite user as usual - with previously entered data.

```
Socialite::driver('github')->user()
```

Additional configuration
------------------------

[](#additional-configuration)

### Server response

[](#server-response)

If you need to imitate user structure from server - it can be achieved with `afterResolving` callback

```
public function register()
{
    $this->app->afterResolving('socialite_local.subject_repository', function ($r){
        $r->setUserCallback(function ($data){
            //data is array coming from login form
            //return array with user info
            return [
                'id' => $data['id'] ?? random_int(1000, 10000),
                'uuid' => $data['uuid'] ?? vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex(random_bytes(16)), 4)),
                'email' => $email = $data['email'],
                'username' => $data['username'] ?? $email,
                'name' => $data['name'] ?? mb_substr($email, 0, strpos($email, '@')) . '_name',
            ];
        });
    });
}
```

### User mapper

[](#user-mapper)

By default, library use original driver mapper - to map server answer to User model. You can disable this behavior by setting `SOCIALITE_LOCAL_USE_ORIGINAL_MAPPER` to false

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance75

Regular maintenance activity

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.5% 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 ~213 days

Total

5

Last Release

139d ago

Major Versions

v0.1.1-alpha → v1.0.02025-05-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/46676bc740c501a0eaf765875d496f7a19db0009d0fd83f0981d0cad0b8270c2?d=identicon)[freebuu](/maintainers/freebuu)

---

Top Contributors

[![freebuu](https://avatars.githubusercontent.com/u/9998200?v=4)](https://github.com/freebuu "freebuu (13 commits)")[![chrisk-7777](https://avatars.githubusercontent.com/u/55621012?v=4)](https://github.com/chrisk-7777 "chrisk-7777 (3 commits)")[![Leuchtkafer](https://avatars.githubusercontent.com/u/13857900?v=4)](https://github.com/Leuchtkafer "Leuchtkafer (1 commits)")

---

Tags

laravelsocialitesocialite-providerslaraveldevoauthsocialitelaravel socialitelocal develop

### Embed Badge

![Health badge](/badges/freebuu-socialite-local/health.svg)

```
[![Health](https://phpackages.com/badges/freebuu-socialite-local/health.svg)](https://phpackages.com/packages/freebuu-socialite-local)
```

###  Alternatives

[socialiteproviders/manager

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

42442.0M544](/packages/socialiteproviders-manager)[socialiteproviders/apple

Apple OAuth2 Provider for Laravel Socialite

618.4M8](/packages/socialiteproviders-apple)[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)[schedula/laravel-passport-socialite

The missing laravel passport feature for social authentication

4922.6k](/packages/schedula-laravel-passport-socialite)[kovah/laravel-socialite-oidc

OpenID Connect OAuth2 Provider for Laravel Socialite

2073.7k](/packages/kovah-laravel-socialite-oidc)[laravel-uis/socialite-ui

A Laravel Socialite UI for the new Laravel Starter Kits

114.3k1](/packages/laravel-uis-socialite-ui)

PHPackages © 2026

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