diff --git a/service-front/app/src/Actor/src/Handler/AuthenticateOneLoginHandler.php b/service-front/app/src/Actor/src/Handler/AuthenticateOneLoginHandler.php index 8707ed469d..4be00deee0 100644 --- a/service-front/app/src/Actor/src/Handler/AuthenticateOneLoginHandler.php +++ b/service-front/app/src/Actor/src/Handler/AuthenticateOneLoginHandler.php @@ -52,6 +52,9 @@ public function handle(ServerRequestInterface $request): ResponseInterface if ($request->getMethod() === 'POST') { $signInLink = $this->serverUrlHelper->generate('/auth/redirect'); $uiLocale = (str_contains($signInLink, '/cy/') ? 'cy' : 'en'); + if ($uiLocale === 'cy') { + $signInLink = trim($signInLink, '/cy'); + } $result = $this->authenticateOneLoginService->authenticate($uiLocale, $signInLink); $this ->getSession($request, SessionMiddleware::SESSION_ATTRIBUTE)