Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
melancn committed Aug 30, 2018
1 parent bd89612 commit 01dd2f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 0 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@
"issues": "https://github.com/cnuer/flarum-ext-auth-cnu/issues",
"source": "https://github.com/cnuer/flarum-ext-auth-cnu"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/cnuer/cnuer-oauth"
}
],
"require": {
"flarum/core": "^0.1.0-beta.6",
"cnuer/oauth": "^0.0.1"
Expand Down
5 changes: 4 additions & 1 deletion src/CnuAuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function handle(Request $request)
$oAuthCode = array_get($queryParams, 'code');

if (!$oAuthCode) {
$server->gotoAuthUrl();
$server->goToLogin();

exit;
} else {
Expand All @@ -70,6 +70,9 @@ public function handle(Request $request)
}

// $temporaryCredentials = unserialize($session->get('temporary_credentials'));
if (empty($info->user) || !is_numeric($info->user)) {
throw new \Flarum\Core\Exception\InvalidConfirmationTokenException('cnu user info error');
}

$identification = ['cnu_id' => $info->user];
$suggestions = [
Expand Down

0 comments on commit 01dd2f6

Please sign in to comment.