diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/login/page.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/login/page.tsx index b82281cd4..725e70f70 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/login/page.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/login/page.tsx @@ -15,6 +15,7 @@ import { getIntl } from "@/i18n" import { SASModal } from "../components/SASModal" import type { LangParams, PageArgs, SearchParams } from "@/types/params" +import type { Lang } from "@/constants/languages" import type { State } from "../sasUtils" const searchParamsSchema = z.object({ @@ -47,7 +48,7 @@ export default async function SASxScandicLoginPage({ const audience = "eb-partner-api" const scope = encodeURIComponent("openid profile email") - const loginLink = `${sasLoginHostname}/oauth/authorize?response_type=code&client_id=${clientId}&redirect_uri=${redirectUri}&scope=${scope}&state=${urlState}&audience=${audience}` + const loginLink = `${sasLoginHostname}/oauth/authorize?response_type=code&client_id=${clientId}&redirect_uri=${redirectUri}&scope=${scope}&state=${urlState}&audience=${audience}&ui_locales=${SAS_LANGUAGE_MAP[params.lang]}` const intentDescriptions: Record = { link: intl.formatMessage({ @@ -110,3 +111,12 @@ export default async function SASxScandicLoginPage({ ) } + +const SAS_LANGUAGE_MAP: Record = { + no: "nb", + sv: "sv", + fi: "fi", + da: "da", + en: "en", + de: "de", +}