Skip to content

Commit

Permalink
Fixes #237: Fix redirect from LinkedIn if user refused to authorize p…
Browse files Browse the repository at this point in the history
…ermissions request
  • Loading branch information
jakim authored and samdark committed Oct 18, 2018
1 parent 7b1e8fa commit 463954a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Yii Framework 2 authclient extension Change Log
2.1.8 under development
-----------------------

- no changes in this release.
- Bug #237: Fix redirect from LinkedIn if user refused to authorize permissions request (jakim)


2.1.7 September 20, 2018
Expand Down
6 changes: 5 additions & 1 deletion src/AuthAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,11 @@ protected function authOAuth2($client)
$request = Yii::$app->getRequest();

if (($error = $request->get('error')) !== null) {
if ($error === 'access_denied' || $error === 'user_cancelled_login') {
if (
$error === 'access_denied' ||
$error === 'user_cancelled_login' ||
$error === 'user_cancelled_authorize'
) {
// user denied error
return $this->authCancel($client);
}
Expand Down

0 comments on commit 463954a

Please sign in to comment.