Download the PHP package qiutuleng/laravel-passport-phone-verification-code-grant without Composer
On this page you can find all versions of the php package qiutuleng/laravel-passport-phone-verification-code-grant. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download qiutuleng/laravel-passport-phone-verification-code-grant
More information about qiutuleng/laravel-passport-phone-verification-code-grant
Files in qiutuleng/laravel-passport-phone-verification-code-grant
Package laravel-passport-phone-verification-code-grant
Short Description Resource owner phone verification code credentials grant for Laravel Passport
License MIT
Informations about the package laravel-passport-phone-verification-code-grant
Laravel Passport Phone Verification Code Grant
Introduction
Resource owner phone verification code credentials grant for Laravel Passport
中文文档 / Chinese document
Install
Under your working folder and run the command in terminal:
Setup
Laravel
If your laravel version is greater or equal to 5.5
, the service provider will be attached automatically.
Other versions, you must needs add \QiuTuleng\PhoneVerificationCodeGrant\PhoneVerificationCodeGrantServiceProvider::class
to the providers
array in config/app.php
:
Lumen
How to use?
Configure
-
You must needs implement
\QiuTuleng\PhoneVerificationCodeGrant\Interfaces\PhoneVerificationCodeGrantUserInterface
interface in yourUser
model. -
Add
findOrNewForPassportVerifyCodeGrant
andvalidateForPassportVerifyCodeGrant
methods to yourUser
model. -
(Optional) Also you can rename
phone_number
andverification_code
fields in config file:To do this, add keys in
config/passport.php
, example:
Request Tokens
You may request an access token by issuing a POST
request to the /oauth/token
route with the user's phone number and verification code.
More
You can check out the Laravel/Passport official documentation to learn more
Contributing
You can create a pull requests to this repository.
Welcome your ideas or code.
Issues
If you have any questions, please ask your question in the Issues and I will try my best to help you.