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

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

robregonm/yii2-auth
===================

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

0.6.2(10y ago)786.2k37[16 issues](https://github.com/robregonm/yii2-auth/issues)[1 PRs](https://github.com/robregonm/yii2-auth/pulls)BSD-3-ClausePHPPHP &gt;=5.4.0

Since Oct 13Pushed 6y ago21 watchersCompare

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

READMEChangelog (1)Dependencies (4)Versions (12)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 robregonm/yii2-auth "*"

```

or add

```
"robregonm/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
	            'signupWithEmailOnly' => false, // false = signup with username + email, true = only email signup
	            '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`

[![Flattr this git repo](https://camo.githubusercontent.com/7e3f46a36526479d701ef7f90a0f8c3ac2fbab3087446e2a9fceed75cd1ab802/687474703a2f2f6170692e666c617474722e636f6d2f627574746f6e2f666c617474722d62616467652d6c617267652e706e67)](https://flattr.com/submit/auto?user_id=robregonm&url=https://github.com/robregonm/yii2-auth&title=Yii2-PDF&language=&tags=github&category=software)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.3% 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 ~23 days

Recently: every ~3 days

Total

11

Last Release

4003d ago

### Community

Maintainers

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

---

Top Contributors

[![robregonm](https://avatars.githubusercontent.com/u/1051457?v=4)](https://github.com/robregonm "robregonm (82 commits)")[![fwerner13](https://avatars.githubusercontent.com/u/224561?v=4)](https://github.com/fwerner13 "fwerner13 (8 commits)")[![cansozeri](https://avatars.githubusercontent.com/u/7555974?v=4)](https://github.com/cansozeri "cansozeri (1 commits)")[![mikebelozorov](https://avatars.githubusercontent.com/u/8688035?v=4)](https://github.com/mikebelozorov "mikebelozorov (1 commits)")[![youanden](https://avatars.githubusercontent.com/u/183880?v=4)](https://github.com/youanden "youanden (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)")

---

Tags

authAuthenticationuseraccessrbacyii2yii

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/robregonm-yii2-auth/health.svg)](https://phpackages.com/packages/robregonm-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)
