PHPackages                             nextvikas/yii2-google-authenticator - 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. nextvikas/yii2-google-authenticator

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

nextvikas/yii2-google-authenticator
===================================

2 step verification of google authenticator for your yii2 application

410.7k↓22.2%5PHP

Since Sep 22Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-google-authenticator
=========================

[](#yii2-google-authenticator)

[![Total Downloads](https://camo.githubusercontent.com/701c21e14b85bc91ef0ac7052af9c466744aedb466613175c80475d9bd9981be/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e65787476696b61732f796969322d676f6f676c652d61757468656e74696361746f722e7376673f6c6f676f3d676974687562266c6f676f436f6c6f723d7768697465267374796c653d666c61742d737175617265)](https://packagist.org/packages/nextvikas/yii2-google-authenticator)![GitHub tag](https://camo.githubusercontent.com/7d1247b7b4bfc85d8b18aa1b592523976175ca614854258dc82672c59bec7064/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d425344253230332d2d436c617573652d627269676874677265656e2e737667)![GitHub tag](https://camo.githubusercontent.com/519f37d7eb80e7620796a807613768ca88433e15a83b372739d28b9eb46549a6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6d706f7365722d796969322d2d657874656e73696f6e2d6f72616e67652e737667)

**yii2-google-authenticator** is an extension for the **Yii2** **PHP framework** that provides two-factor authentication (2FA) using **Google Authenticator**. With the help of this package, developers can easily integrate 2FA in their **Yii2 applications**, which enhances security. Users have to enter a time-based one-time password (TOTP) while logging in from the Google Authenticator app. This extension generates a QR code which users can scan from their Google Authenticator app and also validates the authentication code during the login process. This protects the account from unauthorized access.

Installation
============

[](#installation)

Add to composer.json

```
"nextvikas/yii2-google-authenticator": "@dev"

```

or

```
composer require --prefer-dist "nextvikas/yii2-google-authenticator @dev"

```

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

```
'modules' => [

    ----------------

    'authenticator' => [
        'class' => 'nextvikas\authenticator\Module',
        'twoStepVerification' => true,
    ],
],

--------------------

'bootstrap' => ['log','authenticator'],
```

Migrate Command:

```
yii migrate
php yii migrate --migrationPath=@nextvikas/authenticator/migrations

```

You can then access Next Authenticator through the following URL:

```
http://localhost/path/to/index.php?r=authenticator/default/scan

```

or if you have enabled pretty URLs, you may use the following URL:

```
http://localhost/path/to/index.php/authenticator/default/scan

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1196646e0986e36708de831d5e4fd3fef6e642b43cea0f082da030c049f8c42a?d=identicon)[nextvikas](/maintainers/nextvikas)

---

Top Contributors

[![nextvikas](https://avatars.githubusercontent.com/u/23698573?v=4)](https://github.com/nextvikas "nextvikas (17 commits)")

### Embed Badge

![Health badge](/badges/nextvikas-yii2-google-authenticator/health.svg)

```
[![Health](https://phpackages.com/badges/nextvikas-yii2-google-authenticator/health.svg)](https://phpackages.com/packages/nextvikas-yii2-google-authenticator)
```

###  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)
