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

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

yiicod/yii2-auth
================

The simple auth(login,signup,forgot) with powerful extension for the Yii2 framework

1.0.2(10y ago)61262New BSD LicensePHP

Since Jun 6Pushed 8y ago2 watchersCompare

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

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

Auth extensions
===============

[](#auth-extensions)

If you want simple auth (login/signup/forgot), this is what you want! This extension has simple action what have added in controller. Extension has events:

[![Latest Stable Version](https://camo.githubusercontent.com/44d58e5bce4748f97db2634417d11aba530640a54ec5fcbb14b5093842f49731/68747470733a2f2f706f7365722e707567782e6f72672f796969636f642f796969322d617574682f762f737461626c65)](https://packagist.org/packages/yiicod/yii2-auth) [![Total Downloads](https://camo.githubusercontent.com/be66d47a44cd66d41340c30ee8d6967c6b813e4dc1d6ae7c13277173c23f04fb/68747470733a2f2f706f7365722e707567782e6f72672f796969636f642f796969322d617574682f646f776e6c6f616473)](https://packagist.org/packages/yiicod/yii2-auth) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/b5f37bdcd77a361685a1d28861560933145e41596b58772c4dbdb1f1ba259656/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f796969636f642f796969322d617574682f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/yiicod/yii2-auth/?branch=master)[![Code Climate](https://camo.githubusercontent.com/516911c77bee8f503c1d4cd62f22ba6da2bf25e0806a1e72e9b349e399c64e92/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f796969636f642f796969322d617574682f6261646765732f6770612e737667)](https://codeclimate.com/github/yiicod/yii2-auth)

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist yiicod/yii2-auth "*"

```

or add

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

to the require section of your composer.json.

run

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

Please note that messages are wrapped with `Yii::t()` to support message translations, you should define default message source for them if you don't use i18n.

```
'i18n' => [
    'translations' => [
        '*' => [
            'class' => 'yii\i18n\PhpMessageSource'
        ],
    ],
],
```

Config
------

[](#config)

```
'components' => [
    'auth' => [
        'class' => 'yiicod\auth\Auth',
    ],
]

'bootstrap' => ['auth']
```

Using
-----

[](#using)

Copy yiicod\\auth\\controllers\\WebUserController to controllers folder. After this you can use actions

```
    /**
     * Declares class-based actions.
     * For change functional use AuthUserBehavior.
     * Auth events:
     *
     * - beforeLogin(ActionEvent)
     * - afterLogin(ActionEvent)
     * - errorLogin(ActionEvent)
     *
     * - beforeSignup(ActionEvent)
     * - afterSignup(ActionEvent)
     * - errorSignup(ActionEvent)
     *
     * - beforeCheckRecoveryKey(ActionEvent)
     * - afterCheckRecoveryKey(ActionEvent)
     * - errorCheckRecoveryKey(ActionEvent)
     *
     * - beforeForgot(ActionEvent)
     * - afterForgot(ActionEvent)
     * - errorForgot(ActionEvent)
     *
     * - beforeLogout(ActionEvent)
     * - afterLogout(ActionEvent)
     *
     *
     * Global events
     * yiicod.auth.controllers.webUser.[Action class name].[Event name (beforeLogin)]
     *
     *
     */
    public function actions()
    {

        return ArrayHelper::merge(parent::actions(), [
                'login' => [
                    'class' => \yiicod\auth\actions\webUser\LoginAction::className(),
                ],
                'requestPasswordReset' => [
                    'class' => \yiicod\auth\actions\webUser\RequestPasswordResetAction::className(),
                ],
                'logout' => [
                    'class' => \yiicod\auth\actions\webUser\LogoutAction::className(),
                ],
                'signup' => [
                    'class' => \yiicod\auth\actions\webUser\SignupAction::className(),
                ],
                'resetPassword' => [
                    'class' => \yiicod\auth\actions\webUser\ResetPasswordAction::className(),
                ],
            ]
        );
    }
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

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

Every ~74 days

Total

3

Last Release

3851d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7934283ca98b7f31bb5bf13119a8495cad80ac9097125a48792f47caddb588b9?d=identicon)[lexxorlov](/maintainers/lexxorlov)

---

Top Contributors

[![lexxorlov](https://avatars.githubusercontent.com/u/7910574?v=4)](https://github.com/lexxorlov "lexxorlov (30 commits)")

### Embed Badge

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

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