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

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

darshanadaptit/passport-otp-grant
=================================

passport otp grant for register and login whit verify code

01PHP

Since Jan 17Pushed 3y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

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

[](#passportotpgrant)

[![Latest Version on Packagist](https://camo.githubusercontent.com/32384b31d77d21f0c22ea33febcfe8c06ad7ce4d3f485563a5b93bf5bfe5f720/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6461727368616e616461707469742f70617373706f72742d6f74702d6772616e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/darshanadaptit/passport-otp-grant)[![Total Downloads](https://camo.githubusercontent.com/0b447c66a225487d52474fafa918cdcc26aa4a191d29a628561531fe8ce970c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6461727368616e616461707469742f70617373706f72742d6f74702d6772616e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/darshanadaptit/passport-otp-grant)[![Build Status](https://camo.githubusercontent.com/b0328e99076f0f9c4c7a10cb5163ed37fd0c403ade47a235e0e2d68da8ef466c/68747470733a2f2f7472617669732d63692e636f6d2f6461727368616e616461707469742f70617373706f72742d6f74702d6772616e742e7376673f6272616e63683d6d61696e)](https://travis-ci.com/github/darshanadaptit/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 ore two verification code ) via laravel-passport

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

[](#installation)

Via Composer

```
$ composer require darshanadaptit/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 customizing section)

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

add ` use HasOTP;` in your model :

```
