PHPackages                             aventusgroup/google2fa - 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. aventusgroup/google2fa

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

aventusgroup/google2fa
======================

2fa

1.0.2(1y ago)18.5k—3.8%MITPHPPHP &gt;=7.4

Since Jul 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/AventusGroup/google2fa)[ Packagist](https://packagist.org/packages/aventusgroup/google2fa)[ RSS](/packages/aventusgroup-google2fa/feed)WikiDiscussions main Synced 2d ago

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

google2fa
=========

[](#google2fa)

install
=======

[](#install)

composer require aventusgroup/google2fa

usage
=====

[](#usage)

1. Для каждого пользователя необходимо создать и сохранить ключ(он потребуется для проверки кода).
2. $secret = TwoFactor::generateSecretKey(); // string(16)
3. Генерируем Qr код для пользователя (в метод передаём ранее созданный ключ, а так же название компании и имя пользователя, которые будут отображаться в приложении аутентификации)
4. $qrContent = TwoFactor::generateQr($secret, 'CompanyName', 'UserName'); //base64 контент изображения
5. показываем картинку ![]()
6. Скачиваем приложение для телефона (android [https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&amp;hl=en](https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en), ios )
7. В приложении жмём +, добавить через qr
8. Приложение будет генерировать код из 6 цифр, которые будут действовать 60 секунд
9. Каждый раз когда пользователь будет авторизироваться, необходимо принимать этот код и проверять его
10. TwoFactor::checkCode($code, $secret) // где $code это код из приложения клиента, $secret это сохранённый для клиента ключ. True в случае правильного кода. False в случае неправильного кода

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.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.

###  Release Activity

Cadence

Every ~7 days

Total

3

Last Release

709d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/96ab21c277c3e70b8b1f8f376fedc6adcf5eb291eb8471ec24c865c20bf23f5a?d=identicon)[powar](/maintainers/powar)

---

Top Contributors

[![iPowar](https://avatars.githubusercontent.com/u/5306342?v=4)](https://github.com/iPowar "iPowar (5 commits)")[![AventusGroup](https://avatars.githubusercontent.com/u/91056196?v=4)](https://github.com/AventusGroup "AventusGroup (1 commits)")

### Embed Badge

![Health badge](/badges/aventusgroup-google2fa/health.svg)

```
[![Health](https://phpackages.com/badges/aventusgroup-google2fa/health.svg)](https://phpackages.com/packages/aventusgroup-google2fa)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[statamic/cms

The Statamic CMS Core Package

4.8k3.6M985](/packages/statamic-cms)[jeffgreco13/filament-breezy

A custom package for Filament with login flow, profile and teams support.

1.0k2.1M60](/packages/jeffgreco13-filament-breezy)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

84215.9k9](/packages/stephenjude-filament-two-factor-authentication)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[laragear/two-factor

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

341942.8k18](/packages/laragear-two-factor)

PHPackages © 2026

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