PHPackages                             azozzalfiras/2fa-google - 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. azozzalfiras/2fa-google

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

azozzalfiras/2fa-google
=======================

A PHP package for Google 2FA integration.

20PHP

Since Mar 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/AzozzALFiras/2FA-Google)[ Packagist](https://packagist.org/packages/azozzalfiras/2fa-google)[ RSS](/packages/azozzalfiras-2fa-google/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

AzozzAlfiras 2FA Google - PHP Package
=====================================

[](#azozzalfiras-2fa-google---php-package)

This PHP package provides a simple implementation for Google 2-Factor Authentication (2FA) using the Time-based One-Time Password (TOTP) algorithm. It includes functionalities for generating OTPs, verifying OTPs, and creating QR codes for authentication setup.

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

[](#installation)

You can install this package via Composer:

```
composer require azozzalfiras/2fa-google
```

Usage
-----

[](#usage)

### Setup and Configuration

[](#setup-and-configuration)

To use this package, instantiate the `TwoFactorAuth` class with the secret key, user, and issuer. Optionally, you can customize the user and issuer values.

```
