1
0
Fork 0

feat: allow customizing the display name of the OpenID Connect provider

This commit is contained in:
Finn 2024-08-12 22:05:15 -07:00 committed by GitHub
parent ee926e73cb
commit 6feee555ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 74 additions and 57 deletions

View file

@ -69,6 +69,7 @@ const (
defaultOAuth2ClientSecret = ""
defaultOAuth2RedirectURL = ""
defaultOAuth2OidcDiscoveryEndpoint = ""
defaultOauth2OidcProviderName = "OpenID Connect"
defaultOAuth2Provider = ""
defaultDisableLocalAuth = false
defaultPocketConsumerKey = ""
@ -154,6 +155,7 @@ type Options struct {
oauth2ClientSecret string
oauth2RedirectURL string
oidcDiscoveryEndpoint string
oidcProviderName string
oauth2Provider string
disableLocalAuth bool
pocketConsumerKey string
@ -232,6 +234,7 @@ func NewOptions() *Options {
oauth2ClientSecret: defaultOAuth2ClientSecret,
oauth2RedirectURL: defaultOAuth2RedirectURL,
oidcDiscoveryEndpoint: defaultOAuth2OidcDiscoveryEndpoint,
oidcProviderName: defaultOauth2OidcProviderName,
oauth2Provider: defaultOAuth2Provider,
disableLocalAuth: defaultDisableLocalAuth,
pocketConsumerKey: defaultPocketConsumerKey,
@ -454,6 +457,11 @@ func (o *Options) OIDCDiscoveryEndpoint() string {
return o.oidcDiscoveryEndpoint
}
// OIDCProviderName returns the OAuth2 OIDC provider's display name
func (o *Options) OIDCProviderName() string {
return o.oidcProviderName
}
// OAuth2Provider returns the name of the OAuth2 provider configured.
func (o *Options) OAuth2Provider() string {
return o.oauth2Provider
@ -700,6 +708,7 @@ func (o *Options) SortedOptions(redactSecret bool) []*Option {
"OAUTH2_CLIENT_ID": o.oauth2ClientID,
"OAUTH2_CLIENT_SECRET": redactSecretValue(o.oauth2ClientSecret, redactSecret),
"OAUTH2_OIDC_DISCOVERY_ENDPOINT": o.oidcDiscoveryEndpoint,
"OAUTH2_OIDC_PROVIDER_NAME": o.oidcProviderName,
"OAUTH2_PROVIDER": o.oauth2Provider,
"OAUTH2_REDIRECT_URL": o.oauth2RedirectURL,
"OAUTH2_USER_CREATION": o.oauth2UserCreationAllowed,

View file

@ -225,6 +225,8 @@ func (p *Parser) parseLines(lines []string) (err error) {
p.opts.oauth2RedirectURL = parseString(value, defaultOAuth2RedirectURL)
case "OAUTH2_OIDC_DISCOVERY_ENDPOINT":
p.opts.oidcDiscoveryEndpoint = parseString(value, defaultOAuth2OidcDiscoveryEndpoint)
case "OAUTH2_OIDC_PROVIDER_NAME":
p.opts.oidcProviderName = parseString(value, defaultOauth2OidcProviderName)
case "OAUTH2_PROVIDER":
p.opts.oauth2Provider = parseString(value, defaultOAuth2Provider)
case "DISABLE_LOCAL_AUTH":

View file

@ -210,8 +210,8 @@
"page.settings.title": "Einstellungen",
"page.settings.link_google_account": "Google-Konto verknüpfen",
"page.settings.unlink_google_account": "Verknüpfung mit Google-Konto entfernen",
"page.settings.link_oidc_account": "OpenID-Connect-Konto verknüpfen",
"page.settings.unlink_oidc_account": "Verknüpfung mit OpenID-Connect-Konto entfernen",
"page.settings.link_oidc_account": "%s-Konto verknüpfen",
"page.settings.unlink_oidc_account": "Verknüpfung mit %s-Konto entfernen",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "Aktionen",
"page.settings.webauthn.passkey_name": "Name des Passkeys",
@ -225,7 +225,7 @@
],
"page.login.title": "Anmeldung",
"page.login.google_signin": "Anmeldung mit Google",
"page.login.oidc_signin": "Anmeldung mit OpenID Connect",
"page.login.oidc_signin": "Anmeldung mit %s",
"page.login.webauthn_login": "Melden Sie sich mit dem Passkey an",
"page.login.webauthn_login.error": "Anmeldung mit Passkey nicht möglich",
"page.integrations.title": "Dienste",

View file

@ -210,8 +210,8 @@
"page.settings.title": "Ρυθμίσεις",
"page.settings.link_google_account": "Σύνδεση του λογαριασμό μου Google",
"page.settings.unlink_google_account": "Αποσύνδεση του λογαριασμού μου Google",
"page.settings.link_oidc_account": "Σύνδεση του λογαριασμού μου OpenID Connect",
"page.settings.unlink_oidc_account": "Αποσύνδεση του λογαριασμού μου OpenID Connect",
"page.settings.link_oidc_account": "Σύνδεση του λογαριασμού μου %s",
"page.settings.unlink_oidc_account": "Αποσύνδεση του λογαριασμού μου %s",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "Actions",
"page.settings.webauthn.passkey_name": "Passkey Name",
@ -225,7 +225,7 @@
],
"page.login.title": "Είσοδος",
"page.login.google_signin": "Συνδεθείτε με τo Google",
"page.login.oidc_signin": "Συνδεθείτε με το OpenID Connect",
"page.login.oidc_signin": "Συνδεθείτε με το %s",
"page.login.webauthn_login": "Είσοδος με κωδικό πρόσβασης",
"page.login.webauthn_login.error": "Δεν είναι δυνατή η σύνδεση με κωδικό πρόσβασης",
"page.integrations.title": "Ενσωμάτωση",

View file

@ -210,8 +210,8 @@
"page.settings.title": "Settings",
"page.settings.link_google_account": "Link my Google account",
"page.settings.unlink_google_account": "Unlink my Google account",
"page.settings.link_oidc_account": "Link my OpenID Connect account",
"page.settings.unlink_oidc_account": "Unlink my OpenID Connect account",
"page.settings.link_oidc_account": "Link my %s account",
"page.settings.unlink_oidc_account": "Unlink my %s account",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "Actions",
"page.settings.webauthn.passkey_name": "Passkey Name",
@ -225,7 +225,7 @@
],
"page.login.title": "Sign In",
"page.login.google_signin": "Sign in with Google",
"page.login.oidc_signin": "Sign in with OpenID Connect",
"page.login.oidc_signin": "Sign in with %s",
"page.login.webauthn_login": "Login with passkey",
"page.login.webauthn_login.error": "Unable to login with passkey",
"page.integrations.title": "Integrations",

View file

@ -210,8 +210,8 @@
"page.settings.title": "Ajustes",
"page.settings.link_google_account": "Vincular mi cuenta de Google",
"page.settings.unlink_google_account": "Desvincular mi cuenta de Google",
"page.settings.link_oidc_account": "Vincular mi cuenta de OpenID Connect",
"page.settings.unlink_oidc_account": "Desvincular mi cuenta de OpenID Connect",
"page.settings.link_oidc_account": "Vincular mi cuenta de %s",
"page.settings.unlink_oidc_account": "Desvincular mi cuenta de %s",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "Actions",
"page.settings.webauthn.passkey_name": "Passkey Name",
@ -225,7 +225,7 @@
],
"page.login.title": "Iniciar sesión",
"page.login.google_signin": "Iniciar sesión con tu cuenta de Google",
"page.login.oidc_signin": "Iniciar sesión con tu cuenta de OpenID Connect",
"page.login.oidc_signin": "Iniciar sesión con tu cuenta de %s",
"page.login.webauthn_login": "Iniciar sesión con clave de acceso",
"page.login.webauthn_login.error": "No se puede iniciar sesión con la clave de paso",
"page.integrations.title": "Integraciones",

View file

@ -210,8 +210,8 @@
"page.settings.title": "Asetukset",
"page.settings.link_google_account": "Linkitä Google-tilini",
"page.settings.unlink_google_account": "Poista Google-tilini linkitys",
"page.settings.link_oidc_account": "Linkitä OpenID Connect -tilini",
"page.settings.unlink_oidc_account": "Poista OpenID Connect -tilini linkitys",
"page.settings.link_oidc_account": "Linkitä %s -tilini",
"page.settings.unlink_oidc_account": "Poista %s -tilini linkitys",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "Actions",
"page.settings.webauthn.passkey_name": "Passkey Name",
@ -225,7 +225,7 @@
],
"page.login.title": "Kirjaudu sisään",
"page.login.google_signin": "Kirjaudu sisään Googlella",
"page.login.oidc_signin": "Kirjaudu sisään OpenID Connectilla",
"page.login.oidc_signin": "Kirjaudu sisään %silla",
"page.login.webauthn_login": "Kirjaudu sisään salasanalla",
"page.login.webauthn_login.error": "Ei voida kirjautua sisään salasanalla",
"page.integrations.title": "Integraatiot",

View file

@ -210,8 +210,8 @@
"page.settings.title": "Réglages",
"page.settings.link_google_account": "Associer mon compte Google",
"page.settings.unlink_google_account": "Dissocier mon compte Google",
"page.settings.link_oidc_account": "Associer mon compte OpenID Connect",
"page.settings.unlink_oidc_account": "Dissocier mon compte OpenID Connect",
"page.settings.link_oidc_account": "Associer mon compte %s",
"page.settings.unlink_oidc_account": "Dissocier mon compte %s",
"page.settings.webauthn.passkeys": "Clés daccès",
"page.settings.webauthn.actions": "Actions",
"page.settings.webauthn.passkey_name": "Nom de la clé daccès",
@ -225,7 +225,7 @@
],
"page.login.title": "Connexion",
"page.login.google_signin": "Se connecter avec Google",
"page.login.oidc_signin": "Se connecter avec OpenID Connect",
"page.login.oidc_signin": "Se connecter avec %s",
"page.login.webauthn_login": "Se connecter avec une clé daccès",
"page.login.webauthn_login.error": "Impossible de se connecter avec la clé daccès",
"page.integrations.title": "Intégrations",

View file

@ -210,8 +210,8 @@
"page.settings.title": "समायोजन",
"page.settings.link_google_account": "मेरा गूगल खाता जोरीय",
"page.settings.unlink_google_account": "मेरा गूगल खाता हटाय",
"page.settings.link_oidc_account": "मेरा ओपन-ईद खाता जोरीय",
"page.settings.unlink_oidc_account": "मेरा ओपन-ईद खाता हटाय",
"page.settings.link_oidc_account": "मेरा ओपन-ईद खाता जोरीय (%s)",
"page.settings.unlink_oidc_account": "मेरा ओपन-ईद खाता हटाय (%s)",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "Actions",
"page.settings.webauthn.passkey_name": "Passkey Name",
@ -225,7 +225,7 @@
],
"page.login.title": "साइन इन करें",
"page.login.google_signin": "गूगल के साथ साइन इन करें",
"page.login.oidc_signin": "ओपन-ईद के साथ साइन इन करें",
"page.login.oidc_signin": "ओपन-ईद के साथ साइन इन करें (%s)",
"page.login.webauthn_login": "पासकी से लॉगिन करें",
"page.login.webauthn_login.error": "पासकी से लॉगिन करने में असमर्थ",
"page.integrations.title": "एकीकरण",

View file

@ -201,8 +201,8 @@
"page.settings.title": "Pengaturan",
"page.settings.link_google_account": "Tautkan akun Google saya",
"page.settings.unlink_google_account": "Putuskan akun Google saya",
"page.settings.link_oidc_account": "Tautkan akun OpenID Connect saya",
"page.settings.unlink_oidc_account": "Putuskan akun OpenID Connect saya",
"page.settings.link_oidc_account": "Tautkan akun %s saya",
"page.settings.unlink_oidc_account": "Putuskan akun %s saya",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "Actions",
"page.settings.webauthn.passkey_name": "Passkey Name",
@ -215,7 +215,7 @@
],
"page.login.title": "Masuk",
"page.login.google_signin": "Masuk dengan Google",
"page.login.oidc_signin": "Masuk dengan OpenID Connect",
"page.login.oidc_signin": "Masuk dengan %s",
"page.login.webauthn_login": "Login with passkey",
"page.login.webauthn_login.error": "Unable to login with passkey",
"page.integrations.title": "Integrasi",

View file

@ -210,8 +210,8 @@
"page.settings.title": "Impostazioni",
"page.settings.link_google_account": "Collega il mio account Google",
"page.settings.unlink_google_account": "Scollega il mio account Google",
"page.settings.link_oidc_account": "Collega il mio account OpenID Connect",
"page.settings.unlink_oidc_account": "Scollega il mio account OpenID Connect",
"page.settings.link_oidc_account": "Collega il mio account %s",
"page.settings.unlink_oidc_account": "Scollega il mio account %s",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "Actions",
"page.settings.webauthn.passkey_name": "Passkey Name",
@ -225,7 +225,7 @@
],
"page.login.title": "Accedi",
"page.login.google_signin": "Accedi tramite Google",
"page.login.oidc_signin": "Accedi tramite OpenID Connect",
"page.login.oidc_signin": "Accedi tramite %s",
"page.login.webauthn_login": "Accedi con passkey",
"page.login.webauthn_login.error": "Impossibile accedere con passkey",
"page.integrations.title": "Integrazioni",

View file

@ -201,8 +201,8 @@
"page.settings.title": "設定",
"page.settings.link_google_account": "Google アカウントと接続する",
"page.settings.unlink_google_account": "Google アカウントと接続を解除する",
"page.settings.link_oidc_account": "OpenID Connect アカウントと接続する",
"page.settings.unlink_oidc_account": "OpenID Connect アカウントと接続を解除する",
"page.settings.link_oidc_account": "%s アカウントと接続する",
"page.settings.unlink_oidc_account": "%s アカウントと接続を解除する",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "Actions",
"page.settings.webauthn.passkey_name": "Passkey Name",
@ -215,7 +215,7 @@
],
"page.login.title": "ログイン",
"page.login.google_signin": "Google アカウントでログイン",
"page.login.oidc_signin": "OpenID Connect アカウントでログイン",
"page.login.oidc_signin": "%s アカウントでログイン",
"page.login.webauthn_login": "パスキーでログイン",
"page.login.webauthn_login.error": "パスキーでログインできない",
"page.integrations.title": "連携",

View file

@ -211,8 +211,8 @@
"page.settings.title": "Instellingen",
"page.settings.link_google_account": "Koppel mijn Google-account",
"page.settings.unlink_google_account": "Ontkoppel mijn Google-account",
"page.settings.link_oidc_account": "Koppel mijn OpenID Connect-account",
"page.settings.unlink_oidc_account": "Ontkoppel mijn OpenID Connect-account",
"page.settings.link_oidc_account": "Koppel mijn %s-account",
"page.settings.unlink_oidc_account": "Ontkoppel mijn %s-account",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "Actions",
"page.settings.webauthn.passkey_name": "Passkey Name",
@ -224,7 +224,7 @@
"Verwijder %d wachtwoord",
"Verwijder %d wachtwoordsleutels"
],
"page.login.oidc_signin": "Inloggen via OpenID Connect",
"page.login.oidc_signin": "Inloggen via %s",
"page.login.webauthn_login": "Inloggen met wachtwoord",
"page.login.webauthn_login.error": "Kan niet inloggen met wachtwoord",
"page.login.google_signin": "Inloggen via Google",

View file

@ -219,8 +219,8 @@
"page.settings.title": "Ustawienia",
"page.settings.link_google_account": "Połącz z moim kontem Google",
"page.settings.unlink_google_account": "Odłącz moje konto Google",
"page.settings.link_oidc_account": "Połącz z moim kontem OpenID Connect",
"page.settings.unlink_oidc_account": "Odłącz moje konto OpenID Connect",
"page.settings.link_oidc_account": "Połącz z moim kontem %s",
"page.settings.unlink_oidc_account": "Odłącz moje konto %s",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "Actions",
"page.settings.webauthn.passkey_name": "Passkey Name",
@ -235,7 +235,7 @@
],
"page.login.title": "Zaloguj się",
"page.login.google_signin": "Zaloguj przez Google",
"page.login.oidc_signin": "Zaloguj przez OpenID Connect",
"page.login.oidc_signin": "Zaloguj przez %s",
"page.login.webauthn_login": "Zaloguj się za pomocą hasła",
"page.login.webauthn_login.error": "Nie można zalogować się za pomocą klucza dostępu",
"page.integrations.title": "Usługi",

View file

@ -210,8 +210,8 @@
"page.settings.title": "Ajustes",
"page.settings.link_google_account": "Vincular minha conta do Google",
"page.settings.unlink_google_account": "Desvincular minha conta do Google",
"page.settings.link_oidc_account": "Vincular minha conta do OpenID Connect",
"page.settings.unlink_oidc_account": "Desvincular minha conta do OpenID Connect",
"page.settings.link_oidc_account": "Vincular minha conta do %s",
"page.settings.unlink_oidc_account": "Desvincular minha conta do %s",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "Actions",
"page.settings.webauthn.passkey_name": "Passkey Name",
@ -225,7 +225,7 @@
],
"page.login.title": "Iniciar Sessão",
"page.login.google_signin": "Iniciar Sessão com sua conta do Google",
"page.login.oidc_signin": "Iniciar Sessão com sua conta do OpenID Connect",
"page.login.oidc_signin": "Iniciar Sessão com sua conta do %s",
"page.login.webauthn_login": "Entrar com senha",
"page.login.webauthn_login.error": "Não é possível fazer login com senha",
"page.integrations.title": "Integrações",

View file

@ -219,8 +219,8 @@
"page.settings.title": "Настройки",
"page.settings.link_google_account": "Привязать мой Google аккаунт",
"page.settings.unlink_google_account": "Отвязать мой Google аккаунт",
"page.settings.link_oidc_account": "Привязать мой OpenID Connect аккаунт",
"page.settings.unlink_oidc_account": "Отвязать мой OpenID Connect аккаунт",
"page.settings.link_oidc_account": "Привязать мой %s аккаунт",
"page.settings.unlink_oidc_account": "Отвязать мой %s аккаунт",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "Actions",
"page.settings.webauthn.passkey_name": "Passkey Name",
@ -235,7 +235,7 @@
],
"page.login.title": "Войти",
"page.login.google_signin": "Войти с помощью Google",
"page.login.oidc_signin": "Войти с помощью OpenID Connect",
"page.login.oidc_signin": "Войти с помощью %s",
"page.login.webauthn_login": "Войти с паролем",
"page.login.webauthn_login.error": "Невозможно войти с паролем",
"page.integrations.title": "Интеграции",

View file

@ -455,7 +455,7 @@
"page.keyboard_shortcuts.toggle_read_status_next": "Okundu/okunmadı arasında geçiş yap, sonrakine odaklan",
"page.keyboard_shortcuts.toggle_read_status_prev": "Okundu/okunmadı arasında geçiş yap, öncekine odaklan",
"page.login.google_signin": "Google ile oturum aç",
"page.login.oidc_signin": "OpenID Connect ile oturum aç",
"page.login.oidc_signin": "%s ile oturum aç",
"page.login.title": "Oturum aç",
"page.login.webauthn_login": "Passkey ile giriş yap",
"page.login.webauthn_login.error": "Passkey ile giriş yapılamıyor",
@ -474,10 +474,10 @@
"page.sessions.table.user_agent": "User Agent",
"page.sessions.title": "Oturumlar",
"page.settings.link_google_account": "Google hesabımı bağla",
"page.settings.link_oidc_account": "OpenID Connect hesabımı bağla",
"page.settings.link_oidc_account": "%s hesabımı bağla",
"page.settings.title": "Ayarlar",
"page.settings.unlink_google_account": "Google hesabımın bağlantısını kaldır",
"page.settings.unlink_oidc_account": "OpenID Connect hesabımın bağlantısını kaldır",
"page.settings.unlink_oidc_account": "%s hesabımın bağlantısını kaldır",
"page.settings.webauthn.actions": "Eylemler",
"page.settings.webauthn.added_on": "Eklendi",
"page.settings.webauthn.delete": [

View file

@ -219,8 +219,8 @@
"page.settings.title": "Налаштування ",
"page.settings.link_google_account": "Підключити мій обліковий запис Google",
"page.settings.unlink_google_account": "Відключити мій обліковий запис Google",
"page.settings.link_oidc_account": "Підключити мій обліковий запис OpenID Connect",
"page.settings.unlink_oidc_account": "Відключити мій обліковий запис OpenID Connect",
"page.settings.link_oidc_account": "Підключити мій обліковий запис %s",
"page.settings.unlink_oidc_account": "Відключити мій обліковий запис %s",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "Actions",
"page.settings.webauthn.passkey_name": "Passkey Name",
@ -235,7 +235,7 @@
],
"page.login.title": "Вхід",
"page.login.google_signin": "Увійти через Google",
"page.login.oidc_signin": "Увійти через OpenID Connect",
"page.login.oidc_signin": "Увійти через %s",
"page.login.webauthn_login": "Увійти за допомогою пароля",
"page.login.webauthn_login.error": "Неможливо ввійти за допомогою ключа доступу",
"page.integrations.title": "Інтеграції",

View file

@ -201,8 +201,8 @@
"page.settings.title": "设置",
"page.settings.link_google_account": "关联我的 Google 账户",
"page.settings.unlink_google_account": "解除 Google 账号关联",
"page.settings.link_oidc_account": "关联我的 OpenID Connect 账户",
"page.settings.unlink_oidc_account": "解除 OpenID Connect 账号关联",
"page.settings.link_oidc_account": "关联我的 %s 账户",
"page.settings.unlink_oidc_account": "解除 %s 账号关联",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "操作",
"page.settings.webauthn.passkey_name": "Passkey 名称",
@ -215,7 +215,7 @@
],
"page.login.title": "登录",
"page.login.google_signin": "使用 Google 登录",
"page.login.oidc_signin": "使用 OpenID Connect 登录",
"page.login.oidc_signin": "使用 %s 登录",
"page.login.webauthn_login": "使用密码登录",
"page.login.webauthn_login.error": "无法使用密码登录",
"page.integrations.title": "集成",

View file

@ -201,8 +201,8 @@
"page.settings.title": "設定",
"page.settings.link_google_account": "關聯我的 Google 賬戶",
"page.settings.unlink_google_account": "解除 Google 帳號關聯",
"page.settings.link_oidc_account": "關聯我的 OpenID Connect 賬戶",
"page.settings.unlink_oidc_account": "解除 OpenID Connect 帳號關聯",
"page.settings.link_oidc_account": "關聯我的 %s 賬戶",
"page.settings.unlink_oidc_account": "解除 %s 帳號關聯",
"page.settings.webauthn.passkeys": "Passkeys",
"page.settings.webauthn.actions": "操作",
"page.settings.webauthn.passkey_name": "Passkey 名稱",
@ -215,7 +215,7 @@
],
"page.login.title": "登入",
"page.login.google_signin": "使用 Google 登入",
"page.login.oidc_signin": "使用 OpenID Connect 登入",
"page.login.oidc_signin": "使用 %s 登入",
"page.login.webauthn_login": "使用密碼登錄",
"page.login.webauthn_login.error": "無法使用密碼登錄",
"page.integrations.title": "整合",

View file

@ -40,6 +40,7 @@ func (f *funcMap) Map() template.FuncMap {
"baseURL": config.Opts.BaseURL,
"rootURL": config.Opts.RootURL,
"disableLocalAuth": config.Opts.DisableLocalAuth,
"oidcProviderName": config.Opts.OIDCProviderName,
"hasOAuth2Provider": func(provider string) bool {
return config.Opts.OAuth2Provider() == provider
},

View file

@ -40,7 +40,7 @@
</div>
{{ else if hasOAuth2Provider "oidc" }}
<div class="oauth2">
<a href="{{ route "oauth2Redirect" "provider" "oidc" }}">{{ t "page.login.oidc_signin" }}</a>
<a href="{{ route "oauth2Redirect" "provider" "oidc" }}">{{ t "page.login.oidc_signin" oidcProviderName }}</a>
</div>
{{ end }}
</section>

View file

@ -39,9 +39,9 @@
{{ else if hasOAuth2Provider "oidc" }}
<div class="panel">
{{ if .user.OpenIDConnectID }}
<a href="{{ route "oauth2Unlink" "provider" "oidc" }}">{{ t "page.settings.unlink_oidc_account" }}</a>
<a href="{{ route "oauth2Unlink" "provider" "oidc" }}">{{ t "page.settings.unlink_oidc_account" oidcProviderName }}</a>
{{ else }}
<a href="{{ route "oauth2Redirect" "provider" "oidc" }}">{{ t "page.settings.link_oidc_account" }}</a>
<a href="{{ route "oauth2Redirect" "provider" "oidc" }}">{{ t "page.settings.link_oidc_account" oidcProviderName }}</a>
{{ end }}
</div>
{{ end }}

View file

@ -442,6 +442,11 @@ OpenID Connect discovery endpoint\&.
.br
Default is empty\&.
.TP
.B OAUTH2_OIDC_PROVIDER_NAME
Name to display for the OIDC provider\&.
.br
Default is OpenID Connect\&.
.TP
.B OAUTH2_PROVIDER
Possible values are "google" or "oidc"\&.
.br