PHPackages                             enuke/socialogin - 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. enuke/socialogin

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

enuke/socialogin
================

 enable facebook,twitter and google user login into Laravel powered site

23352PHP

Since Aug 2Pushed 11y ago1 watchersCompare

[ Source](https://github.com/kamaljitenuke/enuke-social)[ Packagist](https://packagist.org/packages/enuke/socialogin)[ RSS](/packages/enuke-socialogin/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

enuke-social
============

[](#enuke-social)

Social login package laravel

Installation Note

Package Installation:

1)composer.json and add below code

```
"require": {
	-- -- -- -- -- --
            "enuke/socialogin": "dev-master"
},

```

2)app/config/app.php

```
'providers' => array(
	-- -- -- -- -- --
            'Enuke\Socialogin\SocialoginServiceProvider',

),

'aliases' => array(
	-- -- -- -- -- --
            'Socialogin'      => 'Enuke\Socialogin\SocialoginFacade',
),

```

3. From your project terminal

    composer update
4. run php artisan config:publish enuke/socialogin and change the configuration in app/config/packages/enuke/socailogin/config.php
5. paste the below line in your view

    [Login with Facebook](/login?type=facebook)[Login with Twitter](/login?type=twitter)[Login with Google](/login?type=google)

    Note: don't change the type param.

6)In your route place

```
//package configuration file
$config = \Config::get("socialogin::config");

//OAuth response. Set your redirect url in vendor/enuke/socialogin/src/config/config.php
Route::get($config['redirect'], function() {

	//get OAuth provider name store in session
	$oauth_provider = Session::get('oauth_provider');

	if (!Session::has('oauth_provider'))
	{
		die('Invalid Access');
	}

	if ( $oauth_provider == 'facebook' ) {
		$code = Input::get('code');
		if (strlen($code) == 0) die('There was an error communicating with Facebook');
		$uid = Socialogin::getUser();
		if ($uid == 0) die('There was an error');
		$data = Socialogin::api('/me');

	}  else if ( $oauth_provider == 'google' ) {
		$google = new Enuke\Socialogin\Google;
		$data = $google->get_data();
		if ( empty($data) ) die('There was an error');
	} else if ( $oauth_provider == 'twitter' ){
		$twitter = new Enuke\Socialogin\Twitter;
		$data = $twitter->get_return();
		if ( empty($data) ) die('There was an error communicating with Twitter');
	}
	//Removing An Item From The Session
	Session::forget('key');
	//return data from Oauth provider
	print_r($data);
});

// login route
Route::get('/login/', function() {
	$type = Input::get('type');
	if (empty($type)){
		die('Invalid Access');
	}
	Session::put('oauth_provider', $type);

	if($type == 'facebook') {
		return Redirect::to(Socialogin::loginUrl());
	} else if ($type == 'twitter') {
		$twitter = new Enuke\Socialogin\Twitter;
		$check_connection = $twitter->login();
		if ( $check_connection ){
		   return Redirect::to($check_connection);
		} else {
		    die('Something Went Wrong');
		}
	} elseif ($type == 'google'){
		$google = new Enuke\Socialogin\Google;
		$url = $google->login();
		return Redirect::to($url);
	}
});

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.8% 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://www.gravatar.com/avatar/702642fc60cef71c4b3154f5b285965912291a21623ebf87b44627455c222250?d=identicon)[kamaljitenuke](/maintainers/kamaljitenuke)

---

Top Contributors

[![kamaljitenuke](https://avatars.githubusercontent.com/u/8264026?v=4)](https://github.com/kamaljitenuke "kamaljitenuke (23 commits)")[![udoi](https://avatars.githubusercontent.com/u/8110682?v=4)](https://github.com/udoi "udoi (1 commits)")

### Embed Badge

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

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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