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