PHPackages                             daninoz/active-auth - 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. daninoz/active-auth

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

daninoz/active-auth
===================

1143PHP

Since Feb 6Pushed 12y ago1 watchersCompare

[ Source](https://github.com/daninoz/ActiveAuth)[ Packagist](https://packagist.org/packages/daninoz/active-auth)[ RSS](/packages/daninoz-active-auth/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Active Auth
===========

[](#active-auth)

Add functionality to the Auth component on **Laravel4** to only login users with an active account.

Setup
-----

[](#setup)

In the `require` key of `composer.json` file add

```
"daninoz/active-auth": "dev-master"

```

Run the Composer update comand

```
$ composer update

```

In your `config/app.php` add `'Daninoz\ActiveAuth\ActiveAuthServiceProvider'` to the end of the `$providers` array

```
'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'Daninoz\ActiveAuth\ActiveAuthServiceProvider',

),
```

### Configuration

[](#configuration)

Set the propertly values to the `config/auth.php`.

### Users table

[](#users-table)

In your user table you just need and active field. By default, Active Auth will look for a field called active but you can change that.

Run:

```
$ php artisan config:publish daninoz/active-auth

```

And a config file is going to be created on `app/config/packages/daninoz/active-auth/config.php`. Just change the active-field key.

### Example

[](#example)

```
$credentials = [
    'email' => Input::get('email'),
    'password' => Input::get('password')
];

$response = ActiveAuth::activeAttempt($credentials);

switch ($response) {
    case ActiveAuth::INVALID_CREDENTIALS:
    case ActiveAuth::INACTIVE_USER:
        return Redirect::back()->with('error', Lang::get($response));

    case ActiveAuth::SUCCESS:
        return Redirect::intended('/');
}
```

License
-------

[](#license)

Active Auth is free software distributed under the terms of the MIT license

[![Bitdeli Badge](https://camo.githubusercontent.com/d28a01ae604702d9a026207143bc05042df9f2c3800cc7bccf134ae6b03db900/68747470733a2f2f64327765637a68766c38323376302e636c6f756466726f6e742e6e65742f64616e696e6f7a2f616374697665617574682f7472656e642e706e67)](https://bitdeli.com/free "Bitdeli Badge")

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

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://avatars.githubusercontent.com/u/1097747?v=4)[Daniel Albornoz](/maintainers/daninoz)[@daninoz](https://github.com/daninoz)

---

Top Contributors

[![daninoz](https://avatars.githubusercontent.com/u/1097747?v=4)](https://github.com/daninoz "daninoz (11 commits)")[![bitdeli-chef](https://avatars.githubusercontent.com/u/3092978?v=4)](https://github.com/bitdeli-chef "bitdeli-chef (1 commits)")

### Embed Badge

![Health badge](/badges/daninoz-active-auth/health.svg)

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

###  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)
