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 1mo ago

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

Community10

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 58.3% 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/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)")[![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

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[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)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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