PHPackages                             khoimk/ezoauth2 - 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. khoimk/ezoauth2

ActiveLibrary

khoimk/ezoauth2
===============

Oauth2 for Lavarel 4. Just some lines of code.

5282PHP

Since Jun 20Pushed 12y ago2 watchersCompare

[ Source](https://github.com/khoimk/ezoauth2)[ Packagist](https://packagist.org/packages/khoimk/ezoauth2)[ RSS](/packages/khoimk-ezoauth2/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ezoauth2
========

[](#ezoauth2)

Oauth2 for Laravel 4

This is very easy to use.

Step 1: Create config file

Add a config file to app/config/ezoauth2.php with content:

return array(

```
	'google'=>array(
			'name'=>'google',
			'key'=>array(
				'id'=>'client_id',
				'secret'=>'client_secret'
				),
			'returnUrl'=>'http://localhost:8080/laravel/public/social/google'
			),
		'facebook'=>array(
			'name'=>'facebook',
			'key'=>array(
				'id'=>'client_id',
				'secret'=>'client_secret'
				),
			'returnUrl'=>'http://localhost:8080/laravel/public/social/facebook'
			)
	);

```

Step 2: Add the last value to providers array in app/config/app.php

'Khoimk\\Ezoauth2\\Ezoauth2ServiceProvider'

Step 3: Add this route to route.php

```
if($provider!=''){
	$o = App::make('ezoauth2');
	$o->setConfig($provider);
	$url = $o->authenticate();
	if($url){
		return Redirect::to($url);
	}
	if(isset($_GET['logout'])){
		$o->logout();
	}
	else{
		if($user = $o->getUserInfo()){
			var_dump($user);
		}
	}
}

```

Step 4: Add this line to composer.json file in the root of laravel

```
"khoimk/ezoauth2": "*"

```

This version just support Google and Facebook authentication. I will include Twitter and MS in next version. Happy coding :)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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

### Embed Badge

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

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

PHPackages © 2026

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