Looking to hire Laravel developers? Try LaraJobs

laravel-auth-sdk maintained by ptdtn

Description
OAuth single sign-on PT DTN accounts
Last update
2023/11/10 08:33 (dev-main)
License
Links
Downloads
41

Comments
comments powered by Disqus

laravel-auth-sdk

A simple library for using PTDTN OAuth Authentication.

Installation

Use composer to manage your dependencies and download PHP-JWT:

composer require ptdtn/laravel-auth-sdk

Configuration

Run php artisan vendor:publish --tag="ptdtntoken" to copy default configuration to your project

Run php artisan migrate to add column ptdtnuser_id to users table

Edit your config/ptdtntoken.php according to your PTDTN client ID

Edit your laravel guard configuration in config/auth.php to use the provided guard

'guards' => [ 'web' => [ 'driver' => 'ptdtntoken', 'provider' => 'users', 'client_index' => 0, ], 'api' => [ 'driver' => 'ptdtntoken', 'provider' => 'users', 'client_index' => 0, ], 'custom' => [ 'driver' => 'ptdtntoken', 'provider' => 'users', 'client_index' => 1, ] ],