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

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

mg-code/yii2-auth
=================

RBAC auth functionality for Yii2 framework

1.0.0(9y ago)14.4kBSD 3-ClausePHP

Since Oct 4Pushed 9y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Usage
-----

[](#usage)

Once the extension is installed, simply modify your application configuration as follows:

```
return [
    'components' => [
        ....
        'authManager' => [
            'class' => 'yii\rbac\DbManager',
            'defaultRoles' => ['public', 'authenticated'],
        ]
    ],
    'as access' => [
        'class' => 'mgcode\auth\components\AccessControl',
        'app' => 'backend',
        'allowActions' => [
            'site/error'
        ],
        'disallowActions' => [
            'disabled/action',
        ]
    ],
];

```

See [Yii RBAC](http://www.yiiframework.com/doc-2.0/guide-security-authorization.html#role-based-access-control-rbac) for more detail.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

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

Unknown

Total

1

Last Release

3513d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1376496?v=4)[Māris Graudiņš](/maintainers/mg-code)[@mg-code](https://github.com/mg-code)

---

Top Contributors

[![mg-code](https://avatars.githubusercontent.com/u/1376496?v=4)](https://github.com/mg-code "mg-code (10 commits)")

---

Tags

authrbacyii2extension

### Embed Badge

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

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

###  Alternatives

[jinxing/yii2-admin

RBAC Auth manager for Yii2

381.0k1](/packages/jinxing-yii2-admin)[kakadu-dev/yii2-jwt-auth

Extension provide JWT auth for Yii2

105.8k](/packages/kakadu-dev-yii2-jwt-auth)

PHPackages © 2026

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