PHPackages                             jason2/auth2 - 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. jason2/auth2

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

jason2/auth2
============

Laravel 4 - Multi Auth With Password Reminder

05PHP

Since Apr 3Pushed 10y ago1 watchersCompare

[ Source](https://github.com/jas0n2/jason2)[ Packagist](https://packagist.org/packages/jason2/auth2)[ RSS](/packages/jason2-auth2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

\##Laravel 4 Multi Auth With Password Reminder

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

[](#installation)

Open your composer.json file, and add the new required package.

```
"pingpong/auth2": "dev-master"

```

Next, open a terminal and run.

```
composer update

```

After the composer updated. Add new service provider in app/config/app.php.

```
'Pingpong\Auth2\Auth2ServiceProvider'

```

Open your terminal and run:

```
php artisan config:publish pingpong/auth2

```

Finish.

Configuration File
------------------

[](#configuration-file)

```
  return array(

  	// example
  	'admin'	=>	array(
  		'driver' 	=> 'eloquent',
  		'model' 	=> 'Admin',
  		'table' 	=> 'admins',
  		'view' 		=> 'emails.auth.reminder'
  	),

  );
```

Example
-------

[](#example)

#### Auth

[](#auth)

```
Auth2::admin()->attempt($credentials, $remember);

if(Auth2::admin()->check())
{
  // code
}

Auth2::admin()->get(); //it's same with Auth::user() , for get credentials

Auth2::admin()->logout();
```

#### Password Reminder

[](#password-reminder)

Password Remind

```
  /**
   * Handle a POST request to remind a user of their password.
   *
   * @return Response
   */
  public function postRemind()
  {
  	$response = Password2::admin()->remind(Input::only('email'), function($message)
  	{
  	    $message->subject('Password Reminder');
  	});

  	switch ($response)
  	{
  		case 'reminders.user':
  			return Redirect::back()->with('error', Lang::get($response));

  		case 'reminders.sent':
  			return Redirect::back()->with('status', Lang::get($response));
  	}
  }
```

Password Reset

```

  /**
   * Handle a POST request to reset a user's password.
   *
   * @return Response
   */
  public function postReset()
  {
  		$credentials = Input::only(
  		'email', 'password', 'password_confirmation', 'token'
  	);

  	$response = Password2::admin()->reset($credentials, function($user, $password)
  	{
  		$user->password = Hash::make($password);

  		$user->save();
  	});

  	switch ($response)
  	{
  		case 'reminders.password':
  		case 'reminders.token':
  		case 'reminders.user':
  			return Redirect::back()->with('error', Lang::get($response));

  		case 'reminders.reset':
  			return Redirect::to('admin');
  	}
  }
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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/b717bde3846c5fd01a66ef248789c57ca3216529613ef4c06744fc37694d8567?d=identicon)[jason24](/maintainers/jason24)

---

Top Contributors

[![gravitano](https://avatars.githubusercontent.com/u/5087538?v=4)](https://github.com/gravitano "gravitano (11 commits)")[![jas0n2](https://avatars.githubusercontent.com/u/8862268?v=4)](https://github.com/jas0n2 "jas0n2 (1 commits)")

### Embed Badge

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

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

###  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.2M117](/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)
