PHPackages                             amin3536/passport-otp-grant - 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. amin3536/passport-otp-grant

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

amin3536/passport-otp-grant
===========================

passport otp grant for register and login with verify code

v1.1.1(2y ago)48871MITPHP

Since Feb 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/amin3536/passport-otp-grant)[ Packagist](https://packagist.org/packages/amin3536/passport-otp-grant)[ Docs](https://github.com/amin3536/passport-otp-grant)[ RSS](/packages/amin3536-passport-otp-grant/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (4)Versions (14)Used By (0)

PassportOtpGrant
================

[](#passportotpgrant)

[![Latest Version on Packagist](https://camo.githubusercontent.com/27dc6807f0674529c53d2adcf3e8f94416340d48a4048e8994342830e0e8d616/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616d696e333533362f70617373706f72742d6f74702d6772616e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/amin3536/passport-otp-grant)[![Total Downloads](https://camo.githubusercontent.com/00982a90d83b4aabd3110fde44818f2647d4c34df94033d9e65cfab72d62e441/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616d696e333533362f70617373706f72742d6f74702d6772616e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/amin3536/passport-otp-grant)[![Build Status](https://camo.githubusercontent.com/d0d6bee1fad78ba0844b5d5d44e14908219b76aa4b2611f2fac45a749e774074/68747470733a2f2f7472617669732d63692e636f6d2f616d696e333533362f70617373706f72742d6f74702d6772616e742e7376673f6272616e63683d6d61696e)](https://travis-ci.com/github/amin3536/passport-otp-grant)[![StyleCI](https://camo.githubusercontent.com/ae314ea685c753b69bf75f28305bb203bd4d572689725880c22abff975fa89cc/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3333393939393732352f736869656c64)](https://github.styleci.io/repos/339999725)

this package help you to implement otp grant (register - login with verify code or two verification code ) via laravel-passport

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

[](#installation)

Via Composer

```
$ composer require amin3536/passport-otp-grant
```

initial
-------

[](#initial)

1-install and initial laravel passport in your project and create a password-client

2- add below two rows to your user migration ( if you want use custom rows see customising section)

```
    //...
    $table->string('phone_number')->unique();
    $table->integer('otp')->nullable();
    //...
```

add ` use HasOTP;` in your model :

```
