PHPackages                             rytescube/otpkit - 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. rytescube/otpkit

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

rytescube/otpkit
================

Laravel package to generate otp or one time password

v1.0.0(5y ago)14MITPHP

Since May 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Rajs0ni/Otpkit)[ Packagist](https://packagist.org/packages/rytescube/otpkit)[ RSS](/packages/rytescube-otpkit/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

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

[](#laravel-otp)

[![Latest Stable Version](https://camo.githubusercontent.com/ed078e8b7a25a2ab1d73071c892b3321cd43196cbd9e360b41994dc4bf20dc58/68747470733a2f2f706f7365722e707567782e6f72672f7279746573637562652f6f74706b69742f762f737461626c65)](https://packagist.org/packages/rytescube/otpkit)[![Total Downloads](https://camo.githubusercontent.com/144cffb4ee0df4261c5fa8223f48c00152e27204d4bdc83cf01f9de86f30ee0a/68747470733a2f2f706f7365722e707567782e6f72672f7279746573637562652f6f74706b69742f646f776e6c6f616473)](https://packagist.org/packages/rytescube/otpkit)[![License](https://camo.githubusercontent.com/da2454e7fcf11be05ec8343c59fa4d42a0209d39b8068e50c0c739a4de06edae/68747470733a2f2f706f7365722e707567782e6f72672f7279746573637562652f6f74706b69742f6c6963656e7365)](https://packagist.org/packages/rytescube/otpkit)[![Issues](https://camo.githubusercontent.com/a2178fd9ce730471cc11adaaab33a908556336b2a6f2520a6bc2c647210df7a6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f52616a73306e692f6f74706b69742e7376673f7374796c653d666c61742d737175617265)](https://github.com/Rajs0ni/Otpkit/issues)[![Stars](https://camo.githubusercontent.com/9feb6597d8fc4ffb4726dcd0819ec7c838c29ffb2a6fe626de07bc8231229d4f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f52616a73306e692f6f74706b69742e7376673f7374796c653d666c61742d737175617265)](https://github.com/Rajs0ni/Otpkit/stargazers)

Laravel package to generate otp or one time password.

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

[](#installation)

In Laravel 5.5+ otpkit will install via the new package discovery feature so you only need to add the package to your composer.json file

```
composer require rytescube/otpkit
```

after installation you should see

```
Discovered Package: rytescube/otpkit
```

and you are ready to go

Basic Usage
-----------

[](#basic-usage)

For quick generation of an OTP just do

```
Otp::generate();
```

This will generate a numeric OTP having length 4.

Advanced Usage
--------------

[](#advanced-usage)

### OTP generation

[](#otp-generation)

Generate an OTP using three variant. You can set the length of the OTP. If not supplied it will generate an OTP having default length 4.

```
Otp::generate($type,$length);
```

ParamsValueDescriptionExample$type`Otp::ALPHA`Generates only alphabetic characters type OTP`Otp::generate(Otp::ALPHA);` //AXBZ`Otp::NUM` (Default)Generates only numeric type OTP`Otp::generate(Otp::NUM);` //1234`Otp::ALPHA_NUM`Generates mix of alphabetic characters &amp; numeric type OTP`Otp::generate(Otp::ALPHA_NUM);` //1A3D$length4 (Default) | 5 | 6Decides the length of the OTP.`Otp::generate(Otp::ALPHA_NUM,5);` //2X8DT

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2189d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23555742?v=4)[RAJ](/maintainers/Rajs0ni)[@Rajs0ni](https://github.com/Rajs0ni)

---

Top Contributors

[![Rajs0ni-rbsl](https://avatars.githubusercontent.com/u/51845686?v=4)](https://github.com/Rajs0ni-rbsl "Rajs0ni-rbsl (3 commits)")

### Embed Badge

![Health badge](/badges/rytescube-otpkit/health.svg)

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M119](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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