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

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

sh4msi/filament-otp
===================

Filament OTP is a package for Filament that allows users to login with a One-Time Password. (OTP and Passwordless are similar, but they differ in some aspects!)

v2.0.0(9mo ago)3329[5 PRs](https://github.com/sh4msi/filament-otp/pulls)MITPHPPHP ^8.2CI passing

Since Dec 3Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/sh4msi/filament-otp)[ Packagist](https://packagist.org/packages/sh4msi/filament-otp)[ Docs](https://github.com/sh4msi/filament-otp)[ GitHub Sponsors](https://github.com/sh4msi)[ RSS](/packages/sh4msi-filament-otp/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (14)Versions (9)Used By (0)

Filament OTP
============

[](#filament-otp)

[![Latest Version on Packagist](https://camo.githubusercontent.com/62a61f2d7690f23d366eb27f3b4b674585157b32ac30fa801aa011b263579aba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7368346d73692f66696c616d656e742d6f74702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sh4msi/filament-otp)[![GitHub Tests Action Status](https://camo.githubusercontent.com/1602273ce11b6a2aef52c9e6fbd805352dc4e8d5d1586e9289f6a84acdf354e4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7368346d73692f66696c616d656e742d6f74702f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/sh4msi/filament-otp/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/f8a6a84b8d6e5ac2b01a7240ccae95ba421c1c875ad498b8529cb2093ffcec8a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7368346d73692f66696c616d656e742d6f74702f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/sh4msi/filament-otp/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/80cf240baad68f716fa279fe4c95ac15faaae466ec821ab32284363ebacdb740/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7368346d73692f66696c616d656e742d6f74702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sh4msi/filament-otp)

Filament OTP is a package for **Filament 3** that allows users to login with a One-Time Password. (OTP and Passwordless are similar, but they differ in some aspects!)

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

[](#installation)

You can install the package via composer:

```
composer require sh4msi/filament-otp
```

You can publish the config file with:

```
php artisan vendor:publish --tag="filament-otp-config"
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="filament-otp-views"
```

This is the contents of the published config file:

```
return [
    /**
     * The authentication model to use.
     */
    'user_model' => \App\Models\User::class,

    /**
     * login columns
     */
    'login_key' => 'email',

    'login_key_rule' => ['email', 'required'],

    /**
     * token resend countdown time
     */
    'resent_token_countdown_time' => 60,

    /**
     * token count
     */
    'token_count' => 5,

    /**
     * token type
     * number, string, etc
     */
    'token_type' => 'number',

    /**
     * token expiry (minutes)
     */
    'token_expiry' => 15,

    /**
     * Rate limit count
     */
    'rate_limit_count' => 3,

    /**
     * Rate limit decay seconds
     */
    'rate_limit_decay_seconds' => 30,

    /**
     * Token generator class must implement TokenGeneratorInterface
     */
    'token_generator' => \Sh4msi\FilamentOtp\Utility\TokenGenerator::class,

    /**
     * Token notification class
     */
    'token_notification' => \Sh4msi\FilamentOtp\Notifications\NotificationOTP::class,

    /**
     * Login confirmation page component
     *
     * If you want to change something, place your component here.
     */
    'confirm_token_component' => \Sh4msi\FilamentOtp\Http\Livewire\Auth\ConfirmOTP::class,

    'login_otp_component' => \Sh4msi\FilamentOtp\Http\Livewire\Auth\LoginOTP::class,

];
```

Usage
-----

[](#usage)

Add the Sh4msi\\FilamentOtp\\Traits\\OtpLogin trait to your User model(s):

```
use Illuminate\Foundation\Auth\User as Authenticatable;
use Sh4msi\FilamentOtp\Traits\OtpLogin;

class User extends Authenticatable
{
    use OtpLogin;

    // ...
}
```

You can use the renderHook() method in the panel configuration object to display the "login with one-time password" button on the login page.

```
use Filament\Panel;
use Illuminate\Contracts\View\View;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->renderHook(
            'panels::auth.login.form.after',
            fn (): View => View('filament-otp::livewire.login-otp-btn'),
        )
}
```

OR call by route

```
route('filament-otp.login')
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Saeed Shamsi](https://github.com/sh4msi)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance63

Regular maintenance activity

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

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

Every ~325 days

Total

3

Last Release

292d ago

Major Versions

v1.0.1 → v2.0.02025-09-13

PHP version history (2 changes)v1.0.0PHP ^8.1

v2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/32f1cefc550790905ad9003a3f19b3943cc6eaad084fcf055297c2a1d7734227?d=identicon)[sh4msi](/maintainers/sh4msi)

---

Top Contributors

[![sh4msi](https://avatars.githubusercontent.com/u/6229984?v=4)](https://github.com/sh4msi "sh4msi (16 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")[![google-labs-jules[bot]](https://avatars.githubusercontent.com/in/842251?v=4)](https://github.com/google-labs-jules[bot] "google-labs-jules[bot] (1 commits)")

---

Tags

laravelsh4msifilament-otp

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/sh4msi-filament-otp/health.svg)

```
[![Health](https://phpackages.com/badges/sh4msi-filament-otp/health.svg)](https://phpackages.com/packages/sh4msi-filament-otp)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M46](/packages/spatie-laravel-pdf)[jeffgreco13/filament-breezy

A custom package for Filament with login flow, profile and teams support.

1.0k2.1M56](/packages/jeffgreco13-filament-breezy)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k36](/packages/spatie-laravel-passkeys)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17760.2k3](/packages/stephenjude-filament-jetstream)

PHPackages © 2026

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