From ff2e7f6cc720d8f7bec499af8cc42301c7005e05 Mon Sep 17 00:00:00 2001 From: Matti Nannt Date: Mon, 5 May 2025 19:18:07 +0200 Subject: [PATCH] chore: make microsoft login available without tenant (#5665) --- apps/web/lib/constants.ts | 16 +++++++--------- apps/web/locales/de-DE.json | 2 +- apps/web/locales/en-US.json | 2 +- apps/web/locales/fr-FR.json | 2 +- apps/web/locales/pt-BR.json | 2 +- apps/web/locales/pt-PT.json | 2 +- apps/web/locales/zh-Hant-TW.json | 2 +- 7 files changed, 13 insertions(+), 15 deletions(-) diff --git a/apps/web/lib/constants.ts b/apps/web/lib/constants.ts index 1bea482d09..561df94ddc 100644 --- a/apps/web/lib/constants.ts +++ b/apps/web/lib/constants.ts @@ -30,13 +30,11 @@ export const IMPRINT_ADDRESS = env.IMPRINT_ADDRESS; export const PASSWORD_RESET_DISABLED = env.PASSWORD_RESET_DISABLED === "1"; export const EMAIL_VERIFICATION_DISABLED = env.EMAIL_VERIFICATION_DISABLED === "1"; -export const GOOGLE_OAUTH_ENABLED = env.GOOGLE_CLIENT_ID && env.GOOGLE_CLIENT_SECRET ? true : false; -export const GITHUB_OAUTH_ENABLED = env.GITHUB_ID && env.GITHUB_SECRET ? true : false; -export const AZURE_OAUTH_ENABLED = - env.AZUREAD_CLIENT_ID && env.AZUREAD_CLIENT_SECRET && env.AZUREAD_TENANT_ID ? true : false; -export const OIDC_OAUTH_ENABLED = - env.OIDC_CLIENT_ID && env.OIDC_CLIENT_SECRET && env.OIDC_ISSUER ? true : false; -export const SAML_OAUTH_ENABLED = env.SAML_DATABASE_URL ? true : false; +export const GOOGLE_OAUTH_ENABLED = !!(env.GOOGLE_CLIENT_ID && env.GOOGLE_CLIENT_SECRET); +export const GITHUB_OAUTH_ENABLED = !!(env.GITHUB_ID && env.GITHUB_SECRET); +export const AZURE_OAUTH_ENABLED = !!(env.AZUREAD_CLIENT_ID && env.AZUREAD_CLIENT_SECRET); +export const OIDC_OAUTH_ENABLED = !!(env.OIDC_CLIENT_ID && env.OIDC_CLIENT_SECRET && env.OIDC_ISSUER); +export const SAML_OAUTH_ENABLED = !!env.SAML_DATABASE_URL; export const SAML_XML_DIR = "./saml-connection"; export const GITHUB_ID = env.GITHUB_ID; @@ -114,7 +112,7 @@ export const S3_REGION = env.S3_REGION; export const S3_ENDPOINT_URL = env.S3_ENDPOINT_URL; export const S3_BUCKET_NAME = env.S3_BUCKET_NAME; export const S3_FORCE_PATH_STYLE = env.S3_FORCE_PATH_STYLE === "1"; -export const UPLOADS_DIR = env.UPLOADS_DIR || "./uploads"; +export const UPLOADS_DIR = env.UPLOADS_DIR ?? "./uploads"; export const MAX_SIZES = { standard: 1024 * 1024 * 10, // 10MB big: 1024 * 1024 * 1024, // 1GB @@ -218,7 +216,7 @@ export const UNSPLASH_ALLOWED_DOMAINS = ["api.unsplash.com"]; export const STRIPE_API_VERSION = "2024-06-20"; // Maximum number of attribute classes allowed: -export const MAX_ATTRIBUTE_CLASSES_PER_ENVIRONMENT = 150 as const; +export const MAX_ATTRIBUTE_CLASSES_PER_ENVIRONMENT = 150; export const DEFAULT_LOCALE = "en-US"; export const AVAILABLE_LOCALES: TUserLocale[] = ["en-US", "de-DE", "pt-BR", "fr-FR", "zh-Hant-TW", "pt-PT"]; diff --git a/apps/web/locales/de-DE.json b/apps/web/locales/de-DE.json index 6829aee398..9ae8e4cb51 100644 --- a/apps/web/locales/de-DE.json +++ b/apps/web/locales/de-DE.json @@ -1,6 +1,6 @@ { "auth": { - "continue_with_azure": "Login mit Azure", + "continue_with_azure": "Weiter mit Microsoft", "continue_with_email": "Login mit E-Mail", "continue_with_github": "Login mit GitHub", "continue_with_google": "Login mit Google", diff --git a/apps/web/locales/en-US.json b/apps/web/locales/en-US.json index 9e7bf1d779..fa83be87e8 100644 --- a/apps/web/locales/en-US.json +++ b/apps/web/locales/en-US.json @@ -1,6 +1,6 @@ { "auth": { - "continue_with_azure": "Continue with Azure", + "continue_with_azure": "Continue with Microsoft", "continue_with_email": "Continue with Email", "continue_with_github": "Continue with GitHub", "continue_with_google": "Continue with Google", diff --git a/apps/web/locales/fr-FR.json b/apps/web/locales/fr-FR.json index a550bade77..beeb99bee8 100644 --- a/apps/web/locales/fr-FR.json +++ b/apps/web/locales/fr-FR.json @@ -1,6 +1,6 @@ { "auth": { - "continue_with_azure": "Continuer avec Azure", + "continue_with_azure": "Continuer avec Microsoft", "continue_with_email": "Continuer avec l'e-mail", "continue_with_github": "Continuer avec GitHub", "continue_with_google": "Continuer avec Google", diff --git a/apps/web/locales/pt-BR.json b/apps/web/locales/pt-BR.json index 40359df0d6..980ad73d27 100644 --- a/apps/web/locales/pt-BR.json +++ b/apps/web/locales/pt-BR.json @@ -1,6 +1,6 @@ { "auth": { - "continue_with_azure": "Continuar com Azure", + "continue_with_azure": "Continuar com Microsoft", "continue_with_email": "Continuar com o Email", "continue_with_github": "Continuar com o GitHub", "continue_with_google": "Continuar com o Google", diff --git a/apps/web/locales/pt-PT.json b/apps/web/locales/pt-PT.json index eeff7ae456..4fa90ed5be 100644 --- a/apps/web/locales/pt-PT.json +++ b/apps/web/locales/pt-PT.json @@ -1,6 +1,6 @@ { "auth": { - "continue_with_azure": "Continuar com Azure", + "continue_with_azure": "Continuar com Microsoft", "continue_with_email": "Continuar com Email", "continue_with_github": "Continuar com GitHub", "continue_with_google": "Continuar com Google", diff --git a/apps/web/locales/zh-Hant-TW.json b/apps/web/locales/zh-Hant-TW.json index 0c78ecea8b..9c9ff8ff19 100644 --- a/apps/web/locales/zh-Hant-TW.json +++ b/apps/web/locales/zh-Hant-TW.json @@ -1,6 +1,6 @@ { "auth": { - "continue_with_azure": "使用 Azure 繼續", + "continue_with_azure": "繼續使用 Microsoft", "continue_with_email": "使用電子郵件繼續", "continue_with_github": "使用 GitHub 繼續", "continue_with_google": "使用 Google 繼續",