Fix OIDC Loop and seed rauthy dev setup closes #510 #513
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
technical improvement
UX Improvement
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: local-it/mitgliederverwaltung#513
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rauthy_setup"
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?
Description of the implemented changes
The changes were:
Automate the local Rauthy dev setup so the
mvOIDC client is recreated automatically afterdocker compose down -vor on a fresh machine, and fix two real bugs in the OIDC logout flow: the user was getting silently re-logged-in after clicking Logout (no RP-initiated logout at the IdP), and the sign-out confirmation page failed several WCAG checks (missing landmarks, missing h1, unreadable button due to a missing Tailwind class).What has been changed?
rauthy-bootstrap/clients.jsondefines themvclient with a fixed dev secret;docker-compose.ymlmountsit at
/app/bootstrapand setsBOOTSTRAP_DIR. The same secret is preset in.env.exampleasOIDC_CLIENT_SECRET. Bootstrap re-runswhenever the Rauthy DB is empty (after volume wipe / fresh setup).
Mv.Oidc.Discoverymodule fetches.well-known/openid-configurationonce per base URL and cachesend_session_endpointin:persistent_term.AuthController.sign_out/2now redirects to that endpoint after clearing the local session, sothe IdP (Authentik / Rauthy) clears its own session and shows its native logout-confirmation UI. Falls back to
/sign-in?oidc_failed=1if discovery fails, and to the existing
return_toredirect when OIDC is not configured.MvWeb.SignOutLivereplacesAshAuthentication.Phoenix.SignOutLive. UsesLayouts.public_page(which provides the<main>landmark), renders a proper<h1>, and uses DaisyUI'sbtn btn-primaryfor the submit button (the library default referenced
bg-blue-500which is not in the project's compiled Tailwind output, producing white text on near-white background).Definition of Done
Code Quality
Accessibility
Testing
Additional Notes
end_session_endpointvia its OIDC discovery document. Authentik and Rauthy bothdo this by default — no extra config in either side is required (specifically no
post_logout_redirect_urineeds to be registered, because we deliberately don't pass one; the IdP shows its own logout-confirmation UI instead).rauthy-bootstrap/clients.jsonis intentionally a static, obviously-non-production string. It is only valid against the local dev Rauthy and must never be reused in any other environment.docker compose down -v && just runonce so Rauthy re-seeds themvclient (theOIDC_CLIENT_SECRETthey currently have in.envwon't match anymore).AshAuthentication.Phoenix.SignOutLivewas only added inash_authentication_phoenix2.16. Once the test deployment is updated, the behavior unifies.Fix OIDC Loop and seed rauthy dev setupto Fix OIDC Loop and seed rauthy dev setup closes #510