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

ActiveYii2-extension[Authentication &amp; Authorization](/categories/authentication)

killbond/yii2-auth
==================

Yii 2 User Authentication &amp; Role Based Access Control (RBAC) Module

0.5.3(11y ago)024BSD-3-ClausePHPPHP &gt;=5.4.0

Since Oct 13Pushed 11y ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (5)Used By (0)

Auth Module
===========

[](#auth-module)

Auth Module is a flexible user registration, authentication &amp; RBAC module for Yii2. It provides user authentication, registration and RBAC support to your Yii2 site.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ php composer.phar require killbond/yii2-auth "*"

```

or add

```
"killbond/yii2-auth": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, modify your application configuration to include:

```
return [
	'modules' => [
	    ...
	        'auth' => [
	            'class' => 'auth\Module',
	            'layout' => '//homepage', // Layout when not logged in yet
	            'layoutLogged' => '//main', // Layout for logged in users
	            'attemptsBeforeCaptcha' => 3, // Optional
	            'supportEmail' => 'support@mydomain.com', // Email for notifications
	            'passwordResetTokenExpire' => 3600, // Seconds for token expiration
	            'superAdmins' => ['admin'], // SuperAdmin users
	            'tableMap' => [ // Optional, but if defined, all must be declared
	                'User' => 'user',
	                'UserStatus' => 'user_status',
	                'ProfileFieldValue' => 'profile_field_value',
	                'ProfileField' => 'profile_field',
	                'ProfileFieldType' => 'profile_field_type',
	            ],
	        ],
	    ...
	],
	...
	'components' => [
	    ...
		'authManager' => [
			'class' => '\yii\rbac\DbManager',
			'ruleTable' => 'AuthRule', // Optional
			'itemTable' => 'AuthItem',  // Optional
			'itemChildTable' => 'AuthItemChild',  // Optional
			'assignmentTable' => 'AuthAssignment',  // Optional
		],
		'user' => [
			'class' => 'auth\components\User',
			'identityClass' => 'auth\models\User', // or replace to your custom identityClass
			'enableAutoLogin' => true,
		],
	    ...
	]
];
```

And run migrations:

```
$ php yii migrate/up --migrationPath=@auth/migrations
```

License
-------

[](#license)

Auth module is released under the BSD-3 License. See the bundled `LICENSE.md` for details.

\#INSTALLATION

./yii migrate/up --migrationPath=@auth/migrations

URLs
----

[](#urls)

- Login: `yourhost/auth/default/login`
- Logout: `yourhost/auth/default/logout`
- Sign-up: `yourhost/auth/default/signup`
- Reset Password: `yourhost/auth/default/reset-password`
- User management: `yourhost/auth/user/index`
- User profile: `yourhost/auth/profile/view`

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.5% 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 ~29 days

Total

4

Last Release

4147d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bfdfa05bd04bde4428f07dfabe9b99c1ff5b5c774f8352b2b8dd4e46b92a76ee?d=identicon)[killbond](/maintainers/killbond)

---

Top Contributors

[![robregonm](https://avatars.githubusercontent.com/u/1051457?v=4)](https://github.com/robregonm "robregonm (66 commits)")[![killbond](https://avatars.githubusercontent.com/u/5491696?v=4)](https://github.com/killbond "killbond (7 commits)")[![fwerner13](https://avatars.githubusercontent.com/u/224561?v=4)](https://github.com/fwerner13 "fwerner13 (6 commits)")[![cansozeri](https://avatars.githubusercontent.com/u/7555974?v=4)](https://github.com/cansozeri "cansozeri (1 commits)")[![matyunya](https://avatars.githubusercontent.com/u/2044570?v=4)](https://github.com/matyunya "matyunya (1 commits)")[![djfly](https://avatars.githubusercontent.com/u/4409731?v=4)](https://github.com/djfly "djfly (1 commits)")[![youanden](https://avatars.githubusercontent.com/u/183880?v=4)](https://github.com/youanden "youanden (1 commits)")

---

Tags

authAuthenticationuseraccessrbacyii2yii

### Embed Badge

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

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

###  Alternatives

[2amigos/yii2-usuario

Highly customizable and extensible user management, authentication, and authorization Yii2 extension

298275.5k14](/packages/2amigos-yii2-usuario)[amnah/yii2-user

Yii 2 user authentication module

252225.7k3](/packages/amnah-yii2-user)[liujx/yii2-app-advanced

Yii2 ace-admin RBAC management background

1301.4k](/packages/liujx-yii2-app-advanced)[izyue/yii2-admin

RBAC Auth manager for Yii2

391.8k](/packages/izyue-yii2-admin)

PHPackages © 2026

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