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

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

ankurk91/laravel-otp
====================

One time password (OTP) generator and verifier.

1.4.0(1y ago)25402MITPHPPHP ^8.2CI passing

Since Sep 10Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/ankurk91/laravel-otp)[ Packagist](https://packagist.org/packages/ankurk91/laravel-otp)[ Docs](https://github.com/ankurk91/laravel-otp)[ RSS](/packages/ankurk91-laravel-otp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (7)Used By (0)

Laravel OTP
===========

[](#laravel-otp)

[![Packagist](https://camo.githubusercontent.com/f09b42deb1fa0e6b9fd2f9b1dfa89b7a2aced8b83616798860c5eb2d00a64ceb/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f762f616e6b75726b39312f6c61726176656c2d6f7470)](https://packagist.org/packages/ankurk91/laravel-otp)[![GitHub-tag](https://camo.githubusercontent.com/aa10e836f84c4634f3b0a1360556229b31037e9b67bd64d9b17cdd1d96847c21/68747470733a2f2f62616467656e2e6e65742f6769746875622f7461672f616e6b75726b39312f6c61726176656c2d6f7470)](https://github.com/ankurk91/laravel-otp/tags)[![License](https://camo.githubusercontent.com/41f9f24430e4540b75597b52b1c4135478dc095aeb27155cf06e972566fa0cff/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f6c6963656e73652f616e6b75726b39312f6c61726176656c2d6f7470)](LICENSE.txt)[![Downloads](https://camo.githubusercontent.com/52da252ac33f1b336ef62b93f4a7807881ae1d19ff367ca2a531b48c31cba162/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f64742f616e6b75726b39312f6c61726176656c2d6f7470)](https://packagist.org/packages/ankurk91/laravel-otp/stats)[![GH-Actions](https://github.com/ankurk91/laravel-otp/workflows/tests/badge.svg)](https://github.com/ankurk91/laravel-otp/actions)[![codecov](https://camo.githubusercontent.com/e04353ddff2cfea9ea8e3b7dae94b19859bd216d5463c372d0af9f7389379ef2/68747470733a2f2f636f6465636f762e696f2f67682f616e6b75726b39312f6c61726176656c2d6f74702f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/ankurk91/laravel-otp)

One time password (OTP) generator and verifier.

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

[](#installation)

You can install the package via composer:

```
composer require "ankurk91/laravel-otp"
```

#### Publish the config file (optional)

[](#publish-the-config-file-optional)

You can publish the [config](./config/otp.php) file into your project.

```
php artisan vendor:publish --provider="Ankurk91\LaravelOTP\OTPServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

You can use the global helper function

```
