feat(kanban-ui): optional PKCE OIDC auth gate - #20
Draft
Pjore wants to merge 1 commit into
Draft
Conversation
Add oidc-client-ts v3.5.0 and wire a full PKCE authentication flow: - auth.ts: singleton UserManager, getToken(), login(), logout(), handleCallback() - AuthGate.tsx: route guard — shows sign-in screen when unauthenticated - AuthCallbackPage.tsx: handles /auth/callback, redirects to / on success - App.tsx: /auth/callback route + AuthGate wrapper - provider-factory.ts: passes getToken into createHttpProvider - TopBar.tsx: sign out button (visible when auth enabled) Auth is opt-in: omit VITE_ZITADEL_ISSUER + VITE_CLIENT_ID to disable. .env.example updated with generic placeholder (no private URLs). README updated with auth quickstart and screenshots.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds optional OIDC/PKCE authentication to kanban-ui using oidc-client-ts v3.5.0.
Auth is fully opt-in — omit
VITE_ZITADEL_ISSUERandVITE_CLIENT_IDandthe app behaves exactly as before.
What was added
src/lib/auth.tsUserManager,getToken(),login(),logout(),handleCallback()src/components/AuthGate.tsxsrc/pages/AuthCallbackPage.tsx/auth/callback, redirects to/on successsrc/App.tsx/auth/callbackroute +<AuthGate>wrappersrc/providers/provider-factory.tsgetTokenintocreateHttpProvidersrc/app-shell/TopBar.tsxScreenshots
Configuration
Register
http://localhost:5173/auth/callback(and/auth/callbackon yourproduction domain) as redirect URIs in your OIDC provider.
Provider notes (Zitadel)
When testing locally with Zitadel, the app must be configured as Web type
(not User Agent / SPA) with Development Mode enabled so that HTTP redirect
URIs are accepted.
Testing
Tested end-to-end against a Zitadel instance: sign in → PKCE authorize redirect
→ login form → callback token exchange → boards page render → sign out. Flow
completes in ~1 s with no console errors.