feat(api): let each organization sign in through its own identity provider

Owners manage OIDC providers under /settings/sso. Users start at
/sso/<org>. New users can be provisioned for verified emails in allowed
domains; existing accounts are never matched by email and must link
their SSO sign-in while signed in.

Closes #4

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-11-22 00:30:43 +01:00
1 parent 9ad5f29f1b
commit 3f21361995
19 files changed
+2731 -231

No files matched your search

+14
View File
@@ -7,6 +7,10 @@ type Page struct {
TitleID string
CSRF string
Languages []string
// ErrorID and NoticeID name catalog messages shown above the content,
// typically after a redirect back from an SSO flow.
ErrorID string
NoticeID string
}
templ Layout(p Page) {
@@ -49,6 +53,7 @@ templ authShell(p Page) {
@languageSwitch(p.Languages)
</div>
<h1 class="mb-6 text-xl font-semibold">{ i18n.T(ctx, p.TitleID) }</h1>
@flash(p)
{ children... }
</main>
}
@@ -73,6 +78,15 @@ templ submit(label string) {
</button>
}
templ flash(p Page) {
if p.ErrorID != "" {
<p class="mb-6 border-l-2 border-down pl-2 text-sm text-down">{ i18n.T(ctx, p.ErrorID) }</p>
}
if p.NoticeID != "" {
<p class="mb-6 border-l-2 border-up pl-2 text-sm">{ i18n.T(ctx, p.NoticeID) }</p>
}
}
templ formError() {
<p data-error class="mb-4 hidden border-l-2 border-down pl-2 text-sm text-down"></p>
}