diff --git a/app/internal/module/Olcs/src/Controller/Auth/LoginController.php b/app/internal/module/Olcs/src/Controller/Auth/LoginController.php index 7eb0ed697c..b3cf5e5249 100644 --- a/app/internal/module/Olcs/src/Controller/Auth/LoginController.php +++ b/app/internal/module/Olcs/src/Controller/Auth/LoginController.php @@ -128,7 +128,7 @@ public function postAction(Request $request, RouteMatch $routeMatch, Response $r $result = $this->attemptAuthentication($request); if ($result->getCode() === Result::SUCCESS) { - return $this->handleSuccessfulAuthentication($result, $response, $request); + return $this->redirectHelper->toRoute(static::ROUTE_DASHBOARD); } if ($result->getCode() === static::AUTH_SUCCESS_WITH_CHALLENGE) { @@ -222,33 +222,6 @@ protected function attemptAuthentication(Request $request): Result return $result; } - /** - * Handles successful authentication. - * - * @return Response - */ - private function handleSuccessfulAuthentication(Result $result, Response $response, Request $request) - { - $identityProvider = $result->getIdentity()['provider']; - - if ($identityProvider === self::DVSA_OLCS_AUTH_CLIENT_COGNITO) { - return $this->handleSuccessCognitoResult(); - } - - return $this->redirectHelper->toRoute(static::ROUTE_AUTH_LOGIN_GET); - } - - /** - * @param array $identity - * @param Request $request - * @param Response $response - * @return Response - */ - private function handleSuccessCognitoResult() - { - return $this->redirectHelper->toRoute(static::ROUTE_DASHBOARD); - } - /** * Validate that the goto URL is valid *