refactor: remove Dex local-password invite provisioning (ADR-019)
Authentik owns invites now (infra ADR-0001). Delete adapters/dex, the /invite set-password UI, the tapir invite CLI, the InvitationStore/ DexPasswordCreator ports + App wiring, the invite Templ pages, and the invite Taskfile target. New users are invited via Authentik, log in via OIDC, and hit the existing /register gate. invitations table (mig 009) left in place (append-only; harmless). task check green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -379,68 +379,6 @@ templ RegisterPage(email, errMsg string) {
|
||||
}
|
||||
}
|
||||
|
||||
// InvitePage is the public set-password form an invited user reaches via their
|
||||
// emailed /invite/{token} link. The email is shown read-only (it is fixed by the
|
||||
// invite, not chosen here); the visitor sets a password to create their account.
|
||||
// errMsg, when set, reports a validation problem on the prior submit. No auth
|
||||
// chrome (header nav) is appropriate — the visitor has no session yet — but the
|
||||
// shared Layout keeps the look consistent.
|
||||
templ InvitePage(email, token, errMsg string) {
|
||||
@PublicLayout("Tapir — Set your password") {
|
||||
<article class="register">
|
||||
<h1>Set up your Tapir account</h1>
|
||||
<p class="meta">Invitation for { email }.</p>
|
||||
<p>Choose a password to finish creating your account. You'll then log in with this email and password.</p>
|
||||
if errMsg != "" {
|
||||
<p class="error" role="alert">{ errMsg }</p>
|
||||
}
|
||||
<form method="post" action={ inviteURL(token) } class="register-form">
|
||||
<label>
|
||||
Email
|
||||
<input type="email" name="email" value={ email } readonly/>
|
||||
</label>
|
||||
<label>
|
||||
Password
|
||||
<input type="password" name="password" minlength="8" required autofocus autocomplete="new-password"/>
|
||||
</label>
|
||||
<label>
|
||||
Confirm password
|
||||
<input type="password" name="password_confirm" minlength="8" required autocomplete="new-password"/>
|
||||
</label>
|
||||
<button type="submit" class="btn">Create my account</button>
|
||||
</form>
|
||||
</article>
|
||||
}
|
||||
}
|
||||
|
||||
// InviteInvalidPage is shown when an invite token is missing, expired, or already
|
||||
// used — a dead-end with no form, so a stale or replayed link reads clearly.
|
||||
templ InviteInvalidPage() {
|
||||
@PublicLayout("Tapir — Invitation") {
|
||||
<article class="register">
|
||||
<h1>This invite link is no longer valid</h1>
|
||||
<p>This invitation has expired or has already been used. Ask for a fresh invite link, or log in if you already have an account.</p>
|
||||
<p><a class="btn" href="/auth/login">Log in</a></p>
|
||||
</article>
|
||||
}
|
||||
}
|
||||
|
||||
// InviteNoticePage is a terminal message after a submit that neither succeeded nor
|
||||
// is a retryable validation error (account already exists, RBAC missing, or the
|
||||
// dev "deployed-only" degrade). showLogin adds a log-in CTA where that is the
|
||||
// natural next step.
|
||||
templ InviteNoticePage(message string, showLogin bool) {
|
||||
@PublicLayout("Tapir — Invitation") {
|
||||
<article class="register">
|
||||
<h1>Invitation</h1>
|
||||
<p>{ message }</p>
|
||||
if showLogin {
|
||||
<p><a class="btn" href="/auth/login">Log in</a></p>
|
||||
}
|
||||
</article>
|
||||
}
|
||||
}
|
||||
|
||||
// AccountPage is the account-management view: the registered display name and
|
||||
// signed-in email, the user's connected video accounts (each with a Disconnect
|
||||
// control), a Connect-YouTube link when none is connected, and the delete-account
|
||||
|
||||
Reference in New Issue
Block a user