Skip to content

Commit

Permalink
DefaultController: capture OAuth errors
Browse files Browse the repository at this point in the history
This will reduce more email spam
  • Loading branch information
MusikAnimal committed Jun 7, 2024
1 parent d0ae6c8 commit 713c1e7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Controller/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public function indexAction(): Response
* @param ProjectRepository $projectRepo
* @param string $centralAuthProject
* @return RedirectResponse
* @throws Exception If initialization fails.
* @codeCoverageIgnore
*/
public function loginAction(
Expand All @@ -70,10 +69,8 @@ public function loginAction(
try {
[ $next, $token ] = $this->getOauthClient($request, $projectRepo, $centralAuthProject)->initiate();
} catch (Exception $oauthException) {
throw $oauthException;
// @TODO Make this work.
//$this->addFlash('error', $oauthException->getMessage());
//return $this->redirectToRoute('homepage');
$this->addFlashMessage('notice', 'error-login');
return $this->redirectToRoute('homepage');
}

// Save the request token to the session.
Expand Down

0 comments on commit 713c1e7

Please sign in to comment.