PHPackages                             emptynick/voyager-2fa - 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. emptynick/voyager-2fa

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

emptynick/voyager-2fa
=====================

Two-factor authentication for Voyager II

v1.0.0(4y ago)225[1 issues](https://github.com/emptynick/voyager-2fa/issues)MITPHP

Since Dec 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/emptynick/voyager-2fa)[ Packagist](https://packagist.org/packages/emptynick/voyager-2fa)[ RSS](/packages/emptynick-voyager-2fa/feed)WikiDiscussions main Synced 4w ago

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

Two-factor-authentication for Voyager II
========================================

[](#two-factor-authentication-for-voyager-ii)

This plugin for Voyager II uses [pragmarx/google2fa-laravel](https://github.com/antonioribeiro/google2fa-laravel) for two-factor-authentication.

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

[](#installation)

First, run `composer require emptynick/voyager-2fa`.
After that run `php artisan 2fa:install`.

This will:

1. Publish `pragmarx/google2fa-laravel` config file
2. Publish a migration to add a field named `google2fa_secret` to your `users` table
3. Migrate

You can skip publishing the config file and migrating.
This is helpful when you want to modify the migration file.

Usage
-----

[](#usage)

By default, this plugin does not force you to use 2FA.
Whenever a 2FA code is assigned to a user, it will ask for it when logging-in.

### Activating 2FA for your account

[](#activating-2fa-for-your-account)

Open the top-right user dropdown and click `Manage 2FA`.
There you will see a QR code and an input box.
Scan the QR code with your phone or enter the code manually and enter the generated OTP into the input.
Click `Enable` and the code will be stored.
Now, whenever you log-in, you'll be asked for a one-time-password.

[![Warning](./.github/assets/manage.png)](./.github/assets/manage.png)

### Disable 2FA

[](#disable-2fa)

Clicking the `Disable` button will remove the OTP code from the database.
You are **not** required to enter an OTP when logging-in.
**This requires the setting `2FA.allow_disabling` to be `on`!**

### Renew 2FA code

[](#renew-2fa-code)

When 2FA is active, you can simply renew the code. Proceed like described in `Activating 2FA for your account` and click on `Renew` instead of `Enable`!

Settings
--------

[](#settings)

This plugin publishes some settings.

### 2FA.force\_2fa

[](#2faforce_2fa)

When active, this setting will prevent the user to open **any** page before setting-up 2FA. Defaults to false.

### 2FA.show\_warning

[](#2fashow_warning)

Shows a warning whenever a page is opened and 2FA is **not** activated for the current user. Defaults to true.

[![Warning](./.github/assets/warning.png)](./.github/assets/warning.png)

### 2FA.allow\_disabling

[](#2faallow_disabling)

Allow users to disable two-factor-auth. Defaults to true.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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

1614d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e5f8e26e1ca25e044bd3bc07ef40da5c52ece42432b5adb08a5800dad431b45?d=identicon)[emptynick](/maintainers/emptynick)

---

Top Contributors

[![emptynick](https://avatars.githubusercontent.com/u/2482942?v=4)](https://github.com/emptynick "emptynick (6 commits)")

---

Tags

authAuthentication2favoyagertwofactorvoyager2-plugin

### Embed Badge

![Health badge](/badges/emptynick-voyager-2fa/health.svg)

```
[![Health](https://phpackages.com/badges/emptynick-voyager-2fa/health.svg)](https://phpackages.com/packages/emptynick-voyager-2fa)
```

###  Alternatives

[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

120220.7k1](/packages/ellaisys-aws-cognito)[awes-io/auth

Laravel Authentication package with built-in two-factor (Authy) and social authentication (Socialite).

3826.7k1](/packages/awes-io-auth)[remotemerge/totp-php

Lightweight, fast, and secure TOTP (2FA) authentication library for PHP — battle tested, dependency free, and ready for enterprise integration.

2010.2k](/packages/remotemerge-totp-php)

PHPackages © 2026

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