pdgi-online / auth
PDGI Authorization Code Grant Client Facade
0.0.2
2025-12-29 03:24 UTC
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.0
- laravel/framework: ^9.0|^10.0|^11.0|^12.0
This package is not auto-updated.
Last update: 2026-04-20 05:15:01 UTC
README
A Laravel package providing a facade for OAuth2 Authorization Code Grant flow for PDGI App.
Features
- Secure OAuth2 authorization code flow
- Automatic user creation and login
- Token management and refresh
- Configurable user model
- Ready-to-use authentication routes
Installation
- Install via composer:
composer require pdgi-online/auth
- Migrate database for PDGI Auth
php artisan migrate
- Add these to your .env file:
PDGI_CLIENT_ID=your-client-id
PDGI_CLIENT_SECRET=your-client-secret
Usage
Full Authentication Flow
add login link
<a href="{{ route('pdgi.auth') }}">Login</a>
- The package will:
- Handle the OAuth flow with PDGI auth
- Fetch user information from the PDGI server
- Create a local user if one doesn't exist
- Log the user in automatically
- Redirect to your dashboard