diff --git a/api/controllers/OauthController.php b/api/controllers/OauthController.php index a74d33e..a815116 100644 --- a/api/controllers/OauthController.php +++ b/api/controllers/OauthController.php @@ -126,6 +126,7 @@ class OauthController extends Controller { if (!$account->canAutoApprove($clientModel, $authParams['scopes'])) { $isAccept = Yii::$app->request->post('accept'); + $isAccept = null; if ($isAccept === null) { throw new AcceptRequiredException(); } diff --git a/common/models/Account.php b/common/models/Account.php index fa40f99..b961a50 100644 --- a/common/models/Account.php +++ b/common/models/Account.php @@ -206,9 +206,9 @@ class Account extends ActiveRecord implements IdentityInterface { * @return bool */ public function canAutoApprove(OauthClient $client, array $scopes = []) { - if ($client->is_trusted) { - return true; - } + //if ($client->is_trusted) { + // return true; + //} /** @var OauthSession|null $session */ $session = $this->getSessions()->andWhere(['client_id' => $client->id])->one();