1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-24 20:06:09 +08:00

修复oauth登录code reused问题

This commit is contained in:
koogua 2021-10-18 09:50:49 +08:00
parent 76c46348d7
commit d6da068320
2 changed files with 3 additions and 5 deletions

View File

@ -132,7 +132,6 @@ class ConnectController extends Controller
}
}
$openUser = $service->getOpenUserInfo($code, $state, $provider);
$connect = $service->getConnectRelation($openUser['id'], $openUser['provider']);
if ($this->authUser->id > 0) {

View File

@ -56,13 +56,12 @@ class PublicController extends \Phalcon\Mvc\Controller
*/
public function shareAction()
{
$id = $this->request->getQuery('id', 'int', 0);
$type = $this->request->getQuery('type', 'string', 'course');
$referer = $this->request->getQuery('referer', 'int', 0);
$id = $this->request->getQuery('id', 'int');
$type = $this->request->getQuery('type', 'string');
$service = new ShareUrlService();
$location = $service->handle($id, $type, $referer);
$location = $service->handle($id, $type);
return $this->response->redirect($location, true);
}