/** * @Route ("/auth/twitch") * @Transactional * * @param array $params * @param ViewModel $model * @throws Exception */ public function authTwitch(array $params, ViewModel $model) { try { $authHandler = new TwitchAuthHandler(); return $authHandler->authenticate($params, $model); } catch (\Exception $e) { $model->title = 'Login error'; $model->error = $e; return 'login'; } }
/** * @Route ("/auth/twitch") * * @param array $params * @param ViewModel $model * @return string * @throws Exception */ public function authTwitch(array $params, ViewModel $model) { try { $authHandler = new TwitchAuthHandler(); return $authHandler->authenticate($params); } catch (\Exception $e) { return $this->handleAuthError($e, $model); } }