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

+3
View File
@@ -61,6 +61,9 @@ var usagePatterns = []struct {
{regexp.MustCompile(`i18n\.T\(ctx, "([a-z0-9_.]+)"[,)]`), ""},
{regexp.MustCompile(`\bfail\(c, [^,]+, "([a-z_]+)"`), "error."},
{regexp.MustCompile(`\b(?:pageFor\(c|s\.page\()(?:, )?"([a-z0-9_.]+)"`), ""},
{regexp.MustCompile(`[^(]"(sso_[a-z_]+)"`), "error."},
{regexp.MustCompile(`return "(invalid_[a-z_]+)"`), "error."},
{regexp.MustCompile(`NoticeID = "([a-z0-9_.]+)"`), ""},
}
// TestUsedKeysExist scans the source tree for literal message IDs so a typo
+79 -40
View File
@@ -1,57 +1,96 @@
{
"app.network_error": "Verbindung fehlgeschlagen.",
"lang.en": "English",
"lang.de": "Deutsch",
"auth.login.title": "Anmelden",
"auth.login.totp_hint": "Code aus der Authenticator-App eingeben.",
"auth.login.submit": "Weiter",
"auth.login.no_account": "Noch kein Konto?",
"auth.login.to_signup": "Registrieren",
"auth.signup.title": "Konto anlegen",
"auth.signup.submit": "Anlegen",
"auth.signup.to_login": "Zur Anmeldung",
"auth.field.name": "Name",
"auth.field.code": "Code",
"auth.field.email": "E-Mail",
"auth.field.password": "Passwort",
"auth.field.name": "Name",
"auth.field.new_password": "Passwort (min. {{.Min}} Zeichen)",
"auth.field.org_name": "Organisation",
"auth.field.org_slug": "Kurzname (a–z, 0–9, -)",
"auth.field.code": "Code",
"console.nav.security": "Sicherheit",
"auth.field.password": "Passwort",
"auth.login.no_account": "Noch kein Konto?",
"auth.login.submit": "Weiter",
"auth.login.title": "Anmelden",
"auth.login.to_signup": "Registrieren",
"auth.login.totp_hint": "Code aus der Authenticator-App eingeben.",
"auth.signup.submit": "Anlegen",
"auth.signup.title": "Konto anlegen",
"auth.signup.to_login": "Zur Anmeldung",
"auth.sso.heading": "Single Sign-on",
"auth.sso.org_placeholder": "Kurzname der Organisation",
"auth.sso.submit": "Weiter",
"common.no": "nein",
"common.save": "Speichern",
"common.yes": "ja",
"console.monitors.empty": "Noch keine Monitore angelegt.",
"console.monitors.title": "Monitore",
"console.nav.logout": "Abmelden",
"console.nav.security": "Sicherheit",
"console.nav.sso": "SSO",
"console.totp_missing": "Deine Organisation verlangt Zwei-Faktor-Anmeldung.",
"console.totp_missing_action": "Jetzt einrichten",
"console.monitors.title": "Monitore",
"console.monitors.empty": "Noch keine Monitore angelegt.",
"security.title": "Sicherheit",
"security.totp.heading": "Zwei-Faktor (TOTP)",
"security.totp.active": "aktiv",
"security.totp.inactive": "nicht eingerichtet",
"security.totp.disable": "Deaktivieren",
"security.totp.current_code": "Aktueller Code",
"security.totp.start": "Einrichten",
"security.totp.qr_alt": "QR-Code für die Authenticator-App",
"security.totp.app_code": "Code aus der App",
"security.totp.confirm": "Bestätigen",
"error.email_taken": "Diese E-Mail-Adresse ist bereits registriert.",
"error.forbidden": "Dafür fehlt dir die Berechtigung.",
"error.internal": "Interner Fehler.",
"error.invalid_code": "Code ungültig.",
"error.invalid_credentials": "E-Mail oder Passwort falsch.",
"error.invalid_domain": "Eine der Domains ist ungültig.",
"error.invalid_input": "Eingaben prüfen.",
"error.invalid_slug": "Kurzname: 2–63 Zeichen, a–z, 0–9 und Bindestrich.",
"error.mfa_expired": "Anmeldung abgelaufen, bitte erneut anmelden.",
"error.no_password": "Konto ohne Passwort.",
"error.not_found": "Nicht gefunden.",
"error.org_not_found": "Organisation nicht gefunden.",
"error.password_too_short": "Das Passwort braucht mindestens {{.Min}} Zeichen.",
"error.rate_limited": "Zu viele Versuche, bitte später erneut.",
"error.signup_closed": "Registrierung ist deaktiviert.",
"error.password_too_short": "Das Passwort braucht mindestens {{.Min}} Zeichen.",
"error.email_taken": "Diese E-Mail-Adresse ist bereits registriert.",
"error.slug_taken": "Dieser Kurzname ist bereits vergeben.",
"error.invalid_slug": "Kurzname: 2–63 Zeichen, a–z, 0–9 und Bindestrich.",
"error.invalid_credentials": "E-Mail oder Passwort falsch.",
"error.mfa_expired": "Anmeldung abgelaufen, bitte erneut anmelden.",
"error.invalid_code": "Code ungültig.",
"error.org_not_found": "Organisation nicht gefunden.",
"error.sso_denied": "Die Anmeldung wurde beim Identity Provider abgebrochen.",
"error.sso_discovery_failed": "Der Identity Provider ist nicht erreichbar oder lieferte keine gültige Konfiguration.",
"error.sso_expired": "Der Anmeldeversuch ist abgelaufen, bitte neu starten.",
"error.sso_forbidden_address": "Der Issuer zeigt auf eine nicht öffentliche Adresse.",
"error.sso_identity_taken": "Diese SSO-Anmeldung ist bereits mit einem anderen Konto verknüpft.",
"error.sso_invalid_issuer": "Der Issuer muss eine https-URL ohne Query und Zugangsdaten sein.",
"error.sso_link_required": "Es gibt bereits ein Konto mit dieser E-Mail. Melde dich mit Passwort an und verknüpfe SSO unter Sicherheit.",
"error.sso_not_member": "Dein Konto ist kein Mitglied dieser Organisation.",
"error.sso_not_provisioned": "Für diese Anmeldung gibt es kein Konto. Bitte lass dich von einem Admin einladen.",
"error.sso_provider_error": "Der Identity Provider konnte die Anmeldung nicht abschließen.",
"error.sso_unavailable": "Für diese Organisation ist kein Single Sign-on verfügbar.",
"error.totp_already_enabled": "TOTP ist bereits aktiv.",
"error.totp_setup_expired": "Einrichtung abgelaufen, bitte neu starten.",
"error.totp_required_by_org": "Eine deiner Organisationen verlangt TOTP.",
"error.no_password": "Konto ohne Passwort.",
"error.unsupported_locale": "Sprache wird nicht unterstützt."
"error.totp_setup_expired": "Einrichtung abgelaufen, bitte neu starten.",
"error.unsupported_locale": "Sprache wird nicht unterstützt.",
"lang.de": "Deutsch",
"lang.en": "English",
"security.sso.heading": "Single Sign-on",
"security.sso.link": "SSO-Anmeldung verknüpfen",
"security.sso.linked": "SSO-Anmeldung verknüpft.",
"security.sso.none": "In dieser Organisation ist keine SSO-Anmeldung verknüpft.",
"security.title": "Sicherheit",
"security.totp.active": "aktiv",
"security.totp.app_code": "Code aus der App",
"security.totp.confirm": "Bestätigen",
"security.totp.current_code": "Aktueller Code",
"security.totp.disable": "Deaktivieren",
"security.totp.heading": "Zwei-Faktor (TOTP)",
"security.totp.inactive": "nicht eingerichtet",
"security.totp.qr_alt": "QR-Code für die Authenticator-App",
"security.totp.start": "Einrichten",
"sso.action.delete": "Provider löschen",
"sso.action.delete_confirm": "Diesen Provider löschen? Verknüpfte Anmeldungen funktionieren dann nicht mehr.",
"sso.action.edit": "Bearbeiten",
"sso.choose.title": "Anmeldung wählen",
"sso.field.allowed_domains": "Erlaubte E-Mail-Domains",
"sso.field.allowed_domains_hint": "Kommagetrennt. Gilt nur für automatisch angelegte Konten; leer erlaubt jede Domain.",
"sso.field.auto_provision": "Konten automatisch anlegen",
"sso.field.client_id": "Client-ID",
"sso.field.client_secret": "Client-Secret",
"sso.field.client_secret_keep": "unverändert",
"sso.field.enabled": "Aktiv",
"sso.field.issuer": "Issuer-URL",
"sso.field.name": "Name",
"sso.settings.add": "Provider hinzufügen",
"sso.settings.intro": "Mitglieder dieser Organisation können sich über euren eigenen OpenID-Connect-Identity-Provider anmelden. Tragt die Redirect-URL unten bei eurem Provider als erlaubten Callback ein.",
"sso.settings.login_url": "Anmelde-URL",
"sso.settings.redirect_url": "Redirect-URL",
"sso.settings.title": "Single Sign-on"
}
+79 -40
View File
@@ -1,57 +1,96 @@
{
"app.network_error": "Connection failed.",
"lang.en": "English",
"lang.de": "Deutsch",
"auth.login.title": "Sign in",
"auth.login.totp_hint": "Enter the code from your authenticator app.",
"auth.login.submit": "Continue",
"auth.login.no_account": "No account yet?",
"auth.login.to_signup": "Sign up",
"auth.signup.title": "Create account",
"auth.signup.submit": "Create",
"auth.signup.to_login": "Back to sign in",
"auth.field.name": "Name",
"auth.field.code": "Code",
"auth.field.email": "Email",
"auth.field.password": "Password",
"auth.field.name": "Name",
"auth.field.new_password": "Password (min. {{.Min}} characters)",
"auth.field.org_name": "Organization",
"auth.field.org_slug": "Short name (a–z, 0–9, -)",
"auth.field.code": "Code",
"console.nav.security": "Security",
"auth.field.password": "Password",
"auth.login.no_account": "No account yet?",
"auth.login.submit": "Continue",
"auth.login.title": "Sign in",
"auth.login.to_signup": "Sign up",
"auth.login.totp_hint": "Enter the code from your authenticator app.",
"auth.signup.submit": "Create",
"auth.signup.title": "Create account",
"auth.signup.to_login": "Back to sign in",
"auth.sso.heading": "Single sign-on",
"auth.sso.org_placeholder": "Organization short name",
"auth.sso.submit": "Continue",
"common.no": "no",
"common.save": "Save",
"common.yes": "yes",
"console.monitors.empty": "No monitors yet.",
"console.monitors.title": "Monitors",
"console.nav.logout": "Sign out",
"console.nav.security": "Security",
"console.nav.sso": "SSO",
"console.totp_missing": "Your organization requires two-factor sign-in.",
"console.totp_missing_action": "Set up now",
"console.monitors.title": "Monitors",
"console.monitors.empty": "No monitors yet.",
"security.title": "Security",
"security.totp.heading": "Two-factor (TOTP)",
"security.totp.active": "active",
"security.totp.inactive": "not set up",
"security.totp.disable": "Disable",
"security.totp.current_code": "Current code",
"security.totp.start": "Set up",
"security.totp.qr_alt": "QR code for your authenticator app",
"security.totp.app_code": "Code from the app",
"security.totp.confirm": "Confirm",
"error.email_taken": "This email address is already registered.",
"error.forbidden": "You are not allowed to do this.",
"error.internal": "Internal error.",
"error.invalid_code": "Invalid code.",
"error.invalid_credentials": "Wrong email or password.",
"error.invalid_domain": "One of the domains is not valid.",
"error.invalid_input": "Please check your input.",
"error.invalid_slug": "Short name: 2–63 characters, a–z, 0–9 and hyphen.",
"error.mfa_expired": "Sign-in expired, please start again.",
"error.no_password": "This account has no password.",
"error.not_found": "Not found.",
"error.org_not_found": "Organization not found.",
"error.password_too_short": "The password needs at least {{.Min}} characters.",
"error.rate_limited": "Too many attempts, please try again later.",
"error.signup_closed": "Sign-up is disabled.",
"error.password_too_short": "The password needs at least {{.Min}} characters.",
"error.email_taken": "This email address is already registered.",
"error.slug_taken": "This short name is already taken.",
"error.invalid_slug": "Short name: 2–63 characters, a–z, 0–9 and hyphen.",
"error.invalid_credentials": "Wrong email or password.",
"error.mfa_expired": "Sign-in expired, please start again.",
"error.invalid_code": "Invalid code.",
"error.org_not_found": "Organization not found.",
"error.sso_denied": "Sign-in was cancelled at the identity provider.",
"error.sso_discovery_failed": "The identity provider could not be reached or returned no valid configuration.",
"error.sso_expired": "The sign-in attempt expired, please start again.",
"error.sso_forbidden_address": "The issuer points to a non-public address.",
"error.sso_identity_taken": "This SSO sign-in is already linked to another account.",
"error.sso_invalid_issuer": "The issuer must be an https URL without query or credentials.",
"error.sso_link_required": "An account with this email already exists. Sign in with your password and link SSO under Security.",
"error.sso_not_member": "Your account is not a member of this organization.",
"error.sso_not_provisioned": "No account exists for this sign-in. Ask an administrator to invite you.",
"error.sso_provider_error": "The identity provider could not complete the sign-in.",
"error.sso_unavailable": "Single sign-on is not available for this organization.",
"error.totp_already_enabled": "TOTP is already active.",
"error.totp_setup_expired": "Setup expired, please start again.",
"error.totp_required_by_org": "One of your organizations requires TOTP.",
"error.no_password": "This account has no password.",
"error.unsupported_locale": "Unsupported language."
"error.totp_setup_expired": "Setup expired, please start again.",
"error.unsupported_locale": "Unsupported language.",
"lang.de": "Deutsch",
"lang.en": "English",
"security.sso.heading": "Single sign-on",
"security.sso.link": "Link SSO sign-in",
"security.sso.linked": "SSO sign-in linked.",
"security.sso.none": "No SSO sign-in linked in this organization.",
"security.title": "Security",
"security.totp.active": "active",
"security.totp.app_code": "Code from the app",
"security.totp.confirm": "Confirm",
"security.totp.current_code": "Current code",
"security.totp.disable": "Disable",
"security.totp.heading": "Two-factor (TOTP)",
"security.totp.inactive": "not set up",
"security.totp.qr_alt": "QR code for your authenticator app",
"security.totp.start": "Set up",
"sso.action.delete": "Delete provider",
"sso.action.delete_confirm": "Delete this provider? Linked sign-ins stop working.",
"sso.action.edit": "Edit",
"sso.choose.title": "Choose sign-in",
"sso.field.allowed_domains": "Allowed email domains",
"sso.field.allowed_domains_hint": "Comma-separated. Only applies to automatically created accounts; empty allows any domain.",
"sso.field.auto_provision": "Create accounts automatically",
"sso.field.client_id": "Client ID",
"sso.field.client_secret": "Client secret",
"sso.field.client_secret_keep": "unchanged",
"sso.field.enabled": "Enabled",
"sso.field.issuer": "Issuer URL",
"sso.field.name": "Name",
"sso.settings.add": "Add provider",
"sso.settings.intro": "Members of this organization can sign in through your own OpenID Connect identity provider. Register the redirect URL below as an allowed callback at your provider.",
"sso.settings.login_url": "Sign-in URL",
"sso.settings.redirect_url": "Redirect URL",
"sso.settings.title": "Single sign-on"
}