PHPackages                             elison/laravel\_google\_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. elison/laravel\_google\_2fa

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

elison/laravel\_google\_2fa
===========================

A Package for 2fa google authentication in Laravel Framework

06PHP

Since Jan 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/elisonkaloshi/laravel_google_2fa)[ Packagist](https://packagist.org/packages/elison/laravel_google_2fa)[ RSS](/packages/elison-laravel-google-2fa/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Google 2fa
==================

[](#laravel-google-2fa)

Package for 2fa Google authentication in Laravel Framework

### Installation

[](#installation)

`composer require elison/laravel_google_2fa`

### Add the provider in the app.php

[](#add-the-provider-in-the-appphp)

`config/app.php`

`\Elison\GoogleAuthenticator\GoogleAuthenticatorProvider::class`

### Add table that stores the secret keys

[](#add-table-that-stores-the-secret-keys)

`php artisan migrate`

### Methods available

[](#methods-available)

`1. GoogleAuthenticator::generateQrCodeUrl($applicationName, $width, $height, $level)` -&gt; This method generates the QR Code which user needs to scan with Google Authenticator, and returns the secret key and qr code url

`2. GoogleAuthenticator::setCredentials($userId, $secretKey)` -&gt; This method stores the secret key for the user that will be used later on, it may be used when the user has finished with code scanning

`3. GoogleAuthenticator::checkIfTwoFaIsActive($userId)` -&gt; This method checks if the 2fa is active for the user, can be used to not display qr code again for an already authenticated user.

`4. GoogleAuthenticator::verifyIfCodeIsValid($userId, $code)` -&gt; This method verifies if the code that the authenticated user enters is valid.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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/b36f3f231299977ba59cab56a7ec6ea8962f83db15f6015b9444bb81bdbfb0f7?d=identicon)[elisonkaloshi](/maintainers/elisonkaloshi)

---

Top Contributors

[![elisonkaloshi](https://avatars.githubusercontent.com/u/61796176?v=4)](https://github.com/elisonkaloshi "elisonkaloshi (14 commits)")[![elisonatd](https://avatars.githubusercontent.com/u/135957496?v=4)](https://github.com/elisonatd "elisonatd (8 commits)")[![elisonkaloshi2](https://avatars.githubusercontent.com/u/135957496?v=4)](https://github.com/elisonkaloshi2 "elisonkaloshi2 (8 commits)")[![paolatili](https://avatars.githubusercontent.com/u/67643174?v=4)](https://github.com/paolatili "paolatili (2 commits)")

### Embed Badge

![Health badge](/badges/elison-laravel-google-2fa/health.svg)

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

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.3M17](/packages/kartik-v-yii2-password)[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)

PHPackages © 2026

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