pdgi-online / auth
PDGI Authorization Code Grant Client Facade
Installs: 31
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/pdgi-online/auth
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: 2025-12-29 03:50:31 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