pod-point/laravel-passport-auth

Laravel Passport Auth Driver and Utilities for Laravel.

v1.0.2 2020-09-16 15:42 UTC

README

Build Status Latest Stable Version

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',