feat(apps/mock-edupass): local OIDC provider with form_post and PKCE - #74
Conversation
Code Review — feat/fake-edupass (2026-08-12 08:41)
Summary
The provider itself is sound: PKCE, Findings🔴 Important1. README's only
|
|
the above is slop produced by review skill take it with a handful of salt |
Addressed Review CommentsReview Point 1 — README's authorize route example (Important) Review Point 4 — Unknown account silently authenticates as teacher-1 (Nit) Review Point 5 — Unhandled prompt name sends no response (Nit) Review Point 6 — Hardcoded test port causes infinite hang (Nit) Review Point 7 — typecheck script missing (Nit) Not addressed (for now)Review Point 2 — CI test job Not addressingReview Point 3 — Test for documented start command |
f323837 to
58921e9
Compare
|
Rebased and downgraded existing typescript from "^6.0.3" to "^5.9.3" with reference to #91 |
…o their consumers
|
With reference to Slack message, ok to merge since this will likely remain a small mock app. Merged Kept |
Close #27
🚀 Summary
Add a local OIDC provider (
apps/mock-edupass) that stands in for Edupass during development and CI testing. This lets developers work on authentication flows without real credentials.✏️ Changes
apps/mock-edupasspackage with Express +oidc-providerform_postresponse mode, andclient_secret_posttoken authteacher-1,teacher-2,teacher-3) with auto-login (no UI)?account=<id>query param (defaults toteacher-1)🧪 Test Plan
pnpm --filter @teacher-workspace/mock-edupass testpasses (8 tests)Notes
Auto-login (no UI): Provider is dev/CI only. Auto-login keeps tests deterministic.
Sample authorization URL:
Acceptance criteria coverage:
Discovery & JWKS advertise required capabilities —
.well-known/openid-configurationreturns correct issuer, response modes, and code challenge methods; JWKS endpoint serves a valid signing key.discovery document has required fieldsJWKS serves a valid public keyAuthorization response reaches callback as form post — Full auth code flow with PKCE completes and delivers the code via HTML form POST to the redirect URI.
completes authorization code flow with PKCE and form_postID token carries fake account's claims — Token exchange returns a signed JWT with correct
sub,email,name; missing claims are omitted (not null).completes authorization code flow with PKCE and form_postabsent claim is not present in ID token (teacher-3)Authorization without PKCE is rejected — Requests missing
code_challengeare refused.rejects authorization without PKCEToken exchange with invalid credential is rejected — Wrong verifier, wrong client secret, and reused authorization codes all fail.
rejects token exchange with wrong code_verifierrejects token exchange with wrong client_secretrejects token exchange with reused code