/**
  * @Route ("/auth/google")
  * @Transactional
  *
  * @param array $params         
  * @param ViewModel $model          
  * @throws Exception
  */
 public function authGoogle(array $params, ViewModel $model)
 {
     try {
         $authHandler = new GoogleAuthHandler();
         return $authHandler->authenticate($params, $model);
     } catch (\Exception $e) {
         $model->title = 'Login error';
         $model->error = $e;
         return 'login';
     }
 }
Пример #2
0
 /**
  * @Route ("/auth/google")
  *
  * @param array $params
  * @param ViewModel $model
  * @return string
  * @throws Exception
  */
 public function authGoogle(array $params, ViewModel $model)
 {
     try {
         $authHandler = new GoogleAuthHandler();
         return $authHandler->authenticate($params);
     } catch (\Exception $e) {
         return $this->handleAuthError($e, $model);
     }
 }