From 6e6d37650d962d49a79cfe7ee2d2df288da5b6d7 Mon Sep 17 00:00:00 2001 From: Halit Aksoy Date: Fri, 16 Oct 2026 01:13:20 +0300 Subject: [PATCH] feat(frontend): open Keycloak pages in the app's language Login and sign-up redirects pass the current language as ui_locales. --- apps/frontend/src/auth/AuthService.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/frontend/src/auth/AuthService.ts b/apps/frontend/src/auth/AuthService.ts index 6629a18..0ad08df 100644 --- a/apps/frontend/src/auth/AuthService.ts +++ b/apps/frontend/src/auth/AuthService.ts @@ -1,3 +1,4 @@ +import i18n from "i18next"; import { User, UserManager, WebStorageStateStore } from "oidc-client-ts"; const CALLBACK_PATH = "/auth/callback"; @@ -68,11 +69,11 @@ export class AuthService { // prompt=login shows the login form even though the guest already has a session. public login(returnTo = currentPath()): Promise { - return this.userManager.signinRedirect({ prompt: "login", state: { returnTo } }); + return this.userManager.signinRedirect({ prompt: "login", ui_locales: i18n.language, state: { returnTo } }); } public signUp(returnTo = currentPath()): Promise { - return this.userManager.signinRedirect({ prompt: "create", state: { returnTo } }); + return this.userManager.signinRedirect({ prompt: "create", ui_locales: i18n.language, state: { returnTo } }); } public logout(): Promise {