PHPackages                             sociallogin/sociallogin - 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. sociallogin/sociallogin

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

sociallogin/sociallogin
=======================

This will provide social login function

013PHP

Since Aug 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/kaushaltest/social)[ Packagist](https://packagist.org/packages/sociallogin/sociallogin)[ RSS](/packages/sociallogin-sociallogin/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Social login system
===================

[](#social-login-system)

[![Latest Version on Packagist](https://camo.githubusercontent.com/82456dffe10213406de5ed1cc1999bed0209b33a3d25e5182cbe558bbe1a7e5f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f6c652f726f6c656261736573797374656d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/role/rolebasesystem)[![Total Downloads](https://camo.githubusercontent.com/d792579ea21fa336b394c17adb1e52621c3d4a317957667d6b24503fcb66f65d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726f6c652f726f6c656261736573797374656d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/role/rolebasesystem)[![License](https://camo.githubusercontent.com/19508b228c356cfc82b3b9c936f83d7d892b1b97e9d7b691fe37d086b7f387d5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b61757368616c746573742f726f6c656261736573797374656d2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Laravel sociallogin is a package that simplifies the process of authenticating users with various OAuth providers, such as Google, Facebook. It abstracts away the complexities of OAuth authentication, making it easier to integrate third-party authentication into your Laravel application.

Indexing
--------

[](#indexing)

1. [Login Integration](#loginintegration)
2. [Installation](#installation)
3. [ENV](#env)
4. [configuration](#configuration)
5. [Publish](#publish)
6. [Routes](#routes)
7. [Run](#run)

LoginIntegration
----------------

[](#loginintegration)

1. Create a Google Project and Obtain Credentials:

    - Go to the Google Developers Console.
    - Create a new project and enable the "Google+ API" (or "People API").
    - Protect routes and actions based on user roles and permissions.
    - Simplified and intuitive API for role and permission management.
    - Integration with Laravel's built-in authentication system.
    - Under "Credentials," create OAuth 2.0 credentials. Configure the authorized redirect URI for your Laravel app.
2. Create a Facebook App and Obtain Credentials:

    - Go to the Facebook Developers Console.
    - Create a new app and configure the OAuth settings.
    - Note down the App ID and App Secret.

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

[](#installation)

You can install the package via composer:

```
composer require sociallogin/sociallogin
```

ENV
---

[](#env)

- .env file add this

```
    GOOGLE_CLIENT_ID=
    GOOGLE_CLIENT_SECRET=
    GOOGLE_REDIRECT=

    FACEBOOK_CLIENT_ID=
    FACEBOOK_CLIENT_SECRET=
    FACEBOOK_REDIRECT_URI=
```

configuration
-------------

[](#configuration)

- In the config/services.php file, add your Google OAuth credentials:

```
    'google' => [
        'client_id' => env('GOOGLE_CLIENT_ID'),
        'client_secret' => env('GOOGLE_CLIENT_SECRET'),
        'redirect' => env('GOOGLE_REDIRECT'),
    ],
    'facebook' => [
        'client_id' => env('FACEBOOK_CLIENT_ID', 'your_default_client_id'),
        'client_secret' => env('FACEBOOK_CLIENT_SECRET', 'your_default_client_secret'),
        'redirect' => env('FACEBOOK_REDIRECT_URI'),
    ],
```

Publish
-------

[](#publish)

- Controller store package controller inside (social/sociallogin/).

```
 php artisan vendor:publish --tag=sociallogin
```

Routes
------

[](#routes)

- route use in this package

```
    //redirect to google login page
    Route::get('auth/google', [Sociallogincontroller::class, "redirectToGoogle"]);
     //This is call back function to get google login credential data
    Route::get('auth/google/callback', [Sociallogincontroller::class, 'handleGoogleCallback']);

    //redirect to facebook login page
    Route::get('auth/facebook', [Sociallogincontroller::class, 'redirectToFacebook']);

    //This is call back function to get facebook login credential data
    Route::get('auth/facebook/callback', [Sociallogincontroller::class, 'handleFacebookCallback']);
```

Run
---

[](#run)

-run this command:

```
php artisan serve
```

- Hit this url for google login ''
- Hit this url for facebook login ''

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/sociallogin-sociallogin/health.svg)

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

###  Alternatives

[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)

PHPackages © 2026

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