Skip to content

Commit

Permalink
AuthoriseOneLoginHandler sends request with en or cy
Browse files Browse the repository at this point in the history
  • Loading branch information
MishNajam committed Oct 23, 2023
1 parent fa84d42 commit 702ca33
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ public function handle(ServerRequestInterface $request): ResponseInterface

if ($request->getMethod() === 'POST') {
$this->getLogger()->info('SUBMIT PRESSED');
$result = $this->authoriseOneLoginService->authorise('en');
$url = $this->urlHelper->generate();
$uiLocale = (str_contains($url, '/cy/') ? 'cy' : 'en');
$result = $this->authoriseOneLoginService->authorise($uiLocale);
$authSessionInterface = AuthSession::fromArray($result);
}

//TODO: PLUG IN EN / CY from uri?
return new HtmlResponse($this->renderer->render('actor::one-login', [
'form' => $form,
]));
Expand Down

0 comments on commit 702ca33

Please sign in to comment.