ptdtn/laravel-auth-sdk

OAuth single sign-on PT DTN accounts

Installs: 41

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/ptdtn/laravel-auth-sdk

v0.1.0 2023-11-10 07:33 UTC

This package is auto-updated.

Last update: 2026-01-10 12:26:23 UTC


README

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