PHPackages                             ekojs/otp - 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. ekojs/otp

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

ekojs/otp
=========

TOTP dan HOTP Library with backup codes, compatible with google authenticator

v3.0.1(1y ago)2157MITPHPPHP ^8.2

Since May 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ekojs/ejsotp)[ Packagist](https://packagist.org/packages/ekojs/otp)[ RSS](/packages/ekojs-otp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (5)Versions (11)Used By (0)

OTP Library
===========

[](#otp-library)

TOTP and HOTP Library with backup codes, compatible with google authenticator. Compatible with PHP &gt;= 8.2.

[![Build Status](https://github.com/ekojs/ejsotp/actions/workflows/release.yml/badge.svg)](http://ekojunaidisalam.com/ejsotp/)[![Coverage Status](https://camo.githubusercontent.com/c1cc0e51dcf1867f862ba4a0f45cd31000a05a38ef789d6f5c9ce11de601ff0e/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f656b6f6a732f656a736f74702f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/ekojs/ejsotp?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/9960ce2c328e63a2063d08ba3fccb26f05fa1ddda23ea5a58a07e827104c4cc7/68747470733a2f2f706f7365722e707567782e6f72672f656b6f6a732f6f74702f76657273696f6e2e737667)](https://packagist.org/packages/ekojs/otp)[![PHP Version Require](https://camo.githubusercontent.com/5f3a403e27f7cf7f2d26800fc8da668c4c84cb2f24949729fba00398b1ab5bda/68747470733a2f2f706f7365722e707567782e6f72672f656b6f6a732f6f74702f726571756972652f706870)](https://packagist.org/packages/ekojs/otp)[![License](https://camo.githubusercontent.com/6ac169d6e84fc6e6752ee211981a030301a741fe3228f305368860f4168ded31/68747470733a2f2f706f7365722e707567782e6f72672f656b6f6a732f6f74702f6c6963656e73652e737667)](https://packagist.org/packages/ekojs/otp)[![Downloads](https://camo.githubusercontent.com/ad5ef6c9aeb682710134af1b3ddb6dbd8b1d3e6e757578e9a92125682eaeb735/68747470733a2f2f706f7365722e707567782e6f72672f656b6f6a732f6f74702f642f746f74616c2e737667)](https://packagist.org/packages/ekojs/otp)

Coverage
--------

[](#coverage)

Check this code coverage on

Install
-------

[](#install)

For PHP version **`>= 8.2`**:

```
composer require ekojs/otp

```

How to use
----------

[](#how-to-use)

### Generate TOTP (Time-Based One-Time Password) based on [RFC 6238](https://datatracker.ietf.org/doc/html/rfc6238)

[](#generate-totp-time-based-one-time-password-based-on-rfc-6238)

```
