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

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

pails/auth
==========

v1.5.2(2mo ago)0507[2 issues](https://github.com/bparks/pails-auth/issues)2PHP

Since Jul 25Pushed 2mo ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (26)Used By (2)

pails-auth
==========

[](#pails-auth)

An authentication and authorization plugin for pails loosely based on UserPie ([userpie.com](http://userpie.com)). At this point it's a near-complete rewrite.

Dependencies
------------

[](#dependencies)

- pails
- pails/activerecord
- pails/actionmailer

We recommend using composer to get the dependencies. Furthermore, we recommend not installing the dependencies for pails-auth directly, but listing pails-auth as a dependency in your pails application's composer.json file.

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

[](#installation)

In the root of a pails app, run

```
composer require pails/auth

```

Configuration
-------------

[](#configuration)

Inside any controller where you want to make use of the authentication/authorization methods, `use` the `PailsAuthentication` [trait](http://php.net/manual/en/language.oop5.traits.php).

```
class DefaultController extends Pails\Controller
{
	use PailsAuthentication;
}
```

You can then use the before actions `require_login` or `require_anonymous`:

```
$before_actions = array(
	'require_login' => array('except' => array('index', 'about', 'contact'))
);
```

Two utility methods, `is_logged_in` and `current_user`, are also provided.

Support
-------

[](#support)

pails-auth is a core plugin maintained and supported by Brian Parks.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance83

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 95.1% 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.

###  Release Activity

Cadence

Every ~161 days

Recently: every ~399 days

Total

25

Last Release

87d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fa7c6719167ebb9c156d400c616cc6df1e7742a31f0ce915b8934a1f4742fe3?d=identicon)[bparks](/maintainers/bparks)

---

Top Contributors

[![bparks](https://avatars.githubusercontent.com/u/538419?v=4)](https://github.com/bparks "bparks (39 commits)")[![kyranb](https://avatars.githubusercontent.com/u/5426926?v=4)](https://github.com/kyranb "kyranb (1 commits)")[![TATDK](https://avatars.githubusercontent.com/u/636270?v=4)](https://github.com/TATDK "TATDK (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[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)[illuminate/auth

The Illuminate Auth package.

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

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)[vonage/jwt

A standalone package for creating JWTs for Vonage APIs

424.1M4](/packages/vonage-jwt)

PHPackages © 2026

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