pod-point / laravel-passport-auth
Laravel Passport Auth Driver and Utilities for Laravel.
Installs: 30 095
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 1
Requires
- guzzlehttp/guzzle: ^6.0
- illuminate/auth: <5.8
Requires (Dev)
- doctrine/instantiator: ~1.0.0
- phpunit/phpunit: ^6.2
This package is auto-updated.
Last update: 2021-01-16 16:32:00 UTC
README
A Laravel user provider which consumes an OAuth2 server to authenticate (via OAuth2 tokens) whilst still retrieving the authenticated users details from your applications own database.
Installation
First install this package from Composer:
composer require pod-point/laravel-passport-auth
Once installed, add the Service Provider to your app's array of Service Providers:
PodPoint\LaravelPassportAuth\ServiceProvider::class,
Then publish the config to your app's config directory:
php artisan vendor:publish --provider="PodPoint\LaravelPassportAuth\ServiceProvider"
You can then add the environment variables stated in config/passport.php
to .env
, which are the details of your OAuth2 server's password
grant client:
PASSPORT_URL= PASSPORT_KEY= PASSPORT_SECRET=
Finally, update your user provider driver in config/auth.php
:
'driver' => 'passport',