Skip to content

ilbee/totp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ilbee/totp

GitHub last commit GitHub Sponsors GitHub Issues or Pull Requests Packagist License Packagist Version Packagist Downloads Packagist Stars

This project is a PHP implementation of the TOTP (Time-Based One-Time Password) algorithm. This library is designed to be used with the Symfony framework.

Installation

You can install this library via Composer:

composer require ilbee/totp

Usage

Configuration

You can configure TOTP by passing additional options when creating the instance:

<?php
// ./src/Controller/UserController.php

use Ilbee\Totp\Totp;

$totp = new Totp([
    'digits' => 6, // Number of digits for the one-time password
    'period' => 30, // Time period for which a password is valid (in seconds)
    'algorithm' => 'sha1', // TOTP Hash algorithm
]);

Contributions

Contributions are welcome. Please open an issue or submit a pull request for any contributions.

Sponsoring

BuyMeACoffee

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages