Sign-in: custom SignInLive, OIDC-only mode and hide OIDC when not configured, locale divider or/oder

This commit is contained in:
Moritz 2026-02-24 15:07:45 +01:00
parent 3f73a36076
commit 2cab4b0de4
Signed by: moritz
GPG key ID: 1020A035E5DD0824
4 changed files with 145 additions and 8 deletions

View file

@ -38,12 +38,10 @@ defmodule MvWeb.AuthOverrides do
set :image_url, nil
end
# Translate the or in the horizontal rule to German
# Translate the "or" in the horizontal rule (between password form and SSO).
# Uses auth domain so it respects the current locale (e.g. "oder" in German).
override AshAuthentication.Phoenix.Components.HorizontalRule do
set :text,
Gettext.with_locale(MvWeb.Gettext, "de", fn ->
Gettext.gettext(MvWeb.Gettext, "or")
end)
set :text, dgettext("auth", "or")
end
# Hide AshAuthentication's Flash component since we use flash_group in root layout