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

0.0.2 2025-12-29 03:24 UTC

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

  1. Install via composer:
composer require pdgi-online/auth
  1. Migrate database for PDGI Auth
php artisan migrate
  1. 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>
  1. 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