ggamover/yii2-aurinko

Authentication module

Maintainers

Package info

github.com/ggamover/aurinko

Type:yii2-extension

pkg:composer/ggamover/yii2-aurinko

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2026-04-05 19:37 UTC

This package is auto-updated.

Last update: 2026-04-05 19:40:52 UTC


README

Aurinko is a Yii2 authentication module that provides user management, login, registration, and password recovery functionality. It includes ready-to-use controllers, models, and email templates to quickly integrate authentication into your application.

Installation

The preferred way to install this extension is through Composer.

Either run

php composer.phar require --prefer-dist ggamover/yii2-aurinko "*"

or add

"ggamover/yii2-aurinko": "*"

to the require section of your composer.json file.

Usage

Web Application Configuration

Add the module to your application configuration:

    'modules' => [
        ...
        'aurinko' => [
            'class' => ggamover\aurinko\Module::class,
        ],
    ],

To enable the built-in mail templates, add the module to the bootstrap section:

    'bootstrap' => [
        'aurinko',
        ...
    ],

Add the controller map

    'controllerMap' => [
        ...
        'auth' => [
            'class' => ggamover\aurinko\controllers\DefaultController::class,
            'viewPath' => '@vendor/ggamover/yii2-aurinko/views/default',
        ],
        'password' => [
            'class' => ggamover\aurinko\controllers\PasswordController::class,
            'viewPath' => '@vendor/ggamover/yii2-aurinko/views/password'
        ],
    ],

Configure the user component:

    'components' => [
        ...
        'user' => [
            'identityClass' => ggamover\aurinko\models\User::class,
            'enableSession' => false, // if rest api
            'loginUrl' => ['auth/login'],
            'enableAutoLogin' => true,
        ],
    ]

Console Application Configuration

To enable database migrations, add the migration path to the migrate controller:

    'controllerMap' => [
        ...
        'migrate' => [
            'class' => \yii\console\controllers\MigrateController::class,
            'migrationPath' => [
                '@app/migrations',
                '@vendor/ggamover/yii2-aurinko/migrations',
            ],
        ]
    ],

Add the module to enable console commands:

'modules' => [
    ...
        'auth' => [
            'class' => ggamover\aurinko\Module::class
        ]
    ],