Thai Digital ID Demo

GitHub Pages — Static Mock

Login with Thai Digital ID

Demo: DGA (OIDC) + ThaID (QR / Biometric)

or
Scan QR with ThaID App
(Mock: simulates user approving in the ThaID mobile app)

DGA: OIDC Authorization Code Flow

  1. Click "Login with DGA" — redirect to DGA authorize endpoint
  2. User authenticates on DGA (mock form in demo)
  3. DGA redirects back with authorization_code
  4. Server exchanges code for access_token + id_token
  5. Server verifies id_token (RS256 + JWKS)
  6. Fetch /userinfo for claims

ThaID: QR + Polling Flow

  1. Click "Login with ThaID" — server generates QR request
  2. Display QR for user to scan with ThaID app
  3. Frontend polls server every 2s for approval
  4. User scans QR + biometric in ThaID app
  5. Server marks request approved
  6. Poll returns approved + session — show profile
S
-DGA
-
IAL -
ID Token (JWT)
-
ID Token Claims
-
UserInfo Response
-