Skip to content

Commit

Permalink
Clean up authenticateOneLoginHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
MishNajam committed Oct 30, 2023
1 parent 06f7b8a commit 728fdf6
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ public function handle(ServerRequestInterface $request): ResponseInterface
$form = new OneLoginForm($this->getCsrfGuard($request));

if ($request->getMethod() === 'POST') {
$url = $this->urlHelper->generate();
$uiLocale = (str_contains($url, '/cy/') ? 'cy' : 'en');
$loginUrl = $this->urlHelper->generate('auth-redirect');
$signInLink = $this->serverUrlHelper->generate($loginUrl);
$signInLink = $this->serverUrlHelper->generate('/auth/redirect');
$uiLocale = (str_contains($signInLink, '/cy/') ? 'cy' : 'en');
$result = $this->authenticateOneLoginService->authenticate($uiLocale, $signInLink);
$this
->getSession($request, SessionMiddleware::SESSION_ATTRIBUTE)
Expand Down

0 comments on commit 728fdf6

Please sign in to comment.