1 | <?php |
||
17 | use yii\helpers\Html; |
||
18 | |||
19 | class AuthAction extends \yii\authclient\AuthAction |
||
20 | { |
||
21 | private LoggerInterface $log; |
||
|
|||
22 | |||
23 | public function __construct($id, $controller, LoggerInterface $log, $config = []) |
||
24 | { |
||
25 | parent::__construct($id, $controller, $config); |
||
26 | $this->log = $log; |
||
27 | } |
||
28 | |||
29 | public function run() |
||
30 | { |
||
31 | try { |
||
32 | return parent::run(); |
||
33 | } catch (Exception $e) { |
||
34 | if ($e->getMessage() !== 'Invalid auth state parameter.') { |
||
35 | Yii::$app->getResponse()->setStatusCode(500); |
||
36 | return Html::encode($e->getMessage()); |
||
37 | } |
||
59 |