the-msy / laravel-passport-one-time-token
Gives the ability to create one time tokens easily with Laravel Passport. Based on lukepolo/laravel-passport-one-time-token package, just updating passport version.
Installs: 87
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 3
pkg:composer/the-msy/laravel-passport-one-time-token
Requires
- php: >=5.6
- laravel/passport: ^3.0.0
Requires (Dev)
- orchestra/testbench: ~3.0
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2025-10-15 02:20:00 UTC
README
Quickly allows you to create one time personal access tokens, that are revoked after one use.
Laravel compatibility
| Laravel | Laravel One Time Token |
|---|---|
| 5.4+ | dev-master |
Installation
Install the package through Composer. Edit your project's composer.json file by adding:
{
"require": {
........,
"lukepolo/laravel-passport-one-time-token": "dev-master"
}
}
If using 5.4 you will need to include the service providers / facade in app/config/app.php:
LukePOLO\LaravelPassportOneTimeToken\ServiceProvider::class,
Copy over the configuration file by running the command:
php artisan vendor:publish --provider='LukePOLO\LaravelPassportOneTimeToken\ServiceProvider'
Requirements
Out of the box we provided some defaults to get you started.
- The user must be logged in
- Middleware
- The default middleware assumes you are consuming this with
auth:api. - You can change this in your config
- The default middleware assumes you are consuming this with
- Created at least one Personal Token client.
Usage
Make a post to
oauth/one-time/create
This will send back your token , which you can use to make another request. Once used it will be revoked.
License
MIT