New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

pvsv1984/lumen-2fa

A One Time Password Authentication package, compatible with Google Authenticator. Authenticates oauth tokens
5

Larablocks Analysis

pvsv1984/lumen-2fa works with Laravel 5 and 6 (latest release v0.1.6.1, May 10, 2022), all past end of life (the last on Sep 6, 2022): no more fixes, even for security.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 5 and 6, past end of life since Sep 6, 2022
  • No release in the last 12 months (last: May 10, 2022)
  • 1 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: May 10, 2022.
  • No releases in the last 12 months.
  • First released: Sep 20, 2018.
  • Monthly downloads: 1.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 28, 2026.

Install
composer require pvsv1984/lumen-2fa
Latest Version:v0.1.6.1
PHP:>=7.0
Laravel:5 · 6
License:BSD-3-Clause
Last Updated:May 10, 2022
Links: GitHub  ·  Packagist
Maintainer: pvsv1984

Google2FA for Lumen

Google Two-Factor Authentication Package for Lumen

Package install: composer require pvsv1984/lumen-2fa

Google2FA is a PHP implementation of the Google Two-Factor Authentication Module, supporting the HMAC-Based One-time Password (HOTP) algorithm specified in RFC 4226 and the Time-based One-time Password (TOTP) algorithm specified in RFC 6238.

This package is a Lumen update to to Google2FA for Laravel package.

The intent of this package is to create a microservice safe way to implement 2FA Code and check responses against user.

Recovery/Backup codes

if you need to create recovery or backup codes to provide a way for your users to recover a lost account, you can use the Recovery Package.

Installation on Lumen

Add the Service Provider to your bootstrap/app.php

Lshtmweb\Lumen2FA\TwoFactorServiceProvider::class

This package assumes you are using Dusterio passport for api authentication and have the standard oauth_tables. Feel free to change the migrations to suit your needs.

Publish the config file and migrations

php artisan vendor:publish --provider="Lshtmweb\Lumen2FA\TwoFactorServiceProvider::class"

Usage

The standard routes have already been set up for you. You can change to suit your need by adding routes and pointing to the correct Controller methods.

  • Add the middleware
    • In route middleware add a new middleware or use the default one lumen2fa to secure your routes.

Events Fired

  • TwoFactorActivatedEvent
  • TwoFactorBeforeDisableEvent
  • TwoFactorDisabledEvent
  • TwoFactorInfoGeneratedEvent

Using Laravel? Try this instead

Google2FA for Laravel

Changes

Pull requests are welcome

Related Packages

pragmarx/google2fa-laravel

A One Time Password Authentication package, compatible with Google Authenticator...

22,865,005 1,054
ibrunotome/google2fa-laravel

The pragmarx/google2fa with cache store instead sessions

11,843 1
gwsn/authentication

Add Authentication layer

70 0
spie/laravel-jwt

JWT package for Laravel and Lumen.

151 4
codeinternetapplications/shopify-oauth

Oauth 2.0 authentication for Shopify apps

416 2

Version History

Version Released PHP License
v0.1.6.1 >=7.0 BSD-3-Clause
v0.1.6 >=7.0 BSD-3-Clause
v0.1.5 >=5.6.4 BSD-3-Clause
v0.1.4 >=5.6.4 BSD-3-Clause
v0.1.3 >=5.6.4 BSD-3-Clause