Register http://localhost:4173 as valid Keycloak redirect URI for pal-e-app client #113
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/pal-e-app#113
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Bug
Lineage
Discovered during pipeline #127 (PR #111). After switching Playwright to preview webServer (#112), 3 auth-boundary tests fail against
http://localhost:4173because Keycloak'spal-e-appclient doesn't list that URL invalidRedirectUris.Repo
forgejo_admin/pal-e-appWhat Broke
Three e2e tests reach the auth-redirect step but the redirect to Keycloak fails (or returns to a wrong URL) because Keycloak's
pal-e-appclient config only allows the prod redirect:e2e/auth.spec.ts:45—/notes/{slug}/edit redirects to Keycloak when unauthenticatede2e/note-edit.spec.ts:4—edit page redirects to Keycloak when not authenticatede2e/note-edit.spec.ts:18—edit page does not render edit form when unauthenticatedThese pass when tests run against the live prod URL (pipeline #125 — they were green) and fail only when running against
http://localhost:4173(pipeline #127).Repro Steps
npm run build && npm run previewhttp://localhost:4173/notes/some-slug/edit(unauthenticated)localhost:4173Expected Behavior
localhost:4173/*registered as a valid redirect URI on the Keycloakpal-e-appclient. After unauthenticated access to/notes/{slug}/edit, browser → Keycloak login page → on success returns tolocalhost:4173/....Environment
pal-e-appclient; checksrc/lib/keycloak.tsfor realm + client id).env.example):pal-e-apphttps://pal-e-app.tail5b443a.ts.net/*(prod — already there)http://localhost:4173/*(preview — to add)http://localhost:5173/*(Vite dev — likely worth adding too)Acceptance Criteria
pal-e-appclientvalidRedirectUrisincludeshttp://localhost:4173/*http://localhost:5173/*for Vite dev workflowhttp://localhost:4173/notes/{slug}/editunauthenticated → land on Keycloak login → after login return to localhost:4173 pageOut of Scope
Related
forgejo_admin/pal-e-app#110, #112— sibling fixes in PR #111feedback_keycloak_first.md— check Keycloak built-in features before custom auth flows