GitHub OAuth2 Demo

Authentication with GitHub

Provider: GitHub OAuth2

Flow: Authorization Code with PKCE

Scopes: user:email, read:user

Token Storage: Secure Cookie Session

How It Works

  1. Click "Login with GitHub" to start OAuth2 flow
  2. Authorize the application on GitHub
  3. Get redirected back with your identity claims
  4. Access protected routes with your authenticated session

Environment Setup

Before running, set these environment variables:

$env:GITHUB_CLIENT_ID = 'your-client-id'
$env:GITHUB_CLIENT_SECRET = 'your-client-secret'

Or create a .env file in the project root.

Features Demonstrated