diff --git a/app/controllers/AuthController.php b/app/controllers/AuthController.php index e30b36d..bc4edae 100644 --- a/app/controllers/AuthController.php +++ b/app/controllers/AuthController.php @@ -46,10 +46,11 @@ class AuthController extends ControllerBase if (is_array($response)) { $this->auth->loginOauth($response['auth']); + $this->response->redirect('/'); + } else { + $this->flash->message('error', 'Failed to authenticate.'); + $this->response->redirect('/login'); } - - $this->flash->message('error', 'Failed to authenticate.'); - $this->response->redirect('/login'); } public function logoutAction()