/** * * @return \Phalcon\Http\ResponseInterface */ public function tokenGithubAction() { $this->view->disable(); $auth = new GithubAuth($this->config->github); list($uid, $token, $user) = $auth->authorize(); if (isset($token) && is_object($token) && isset($uid)) { //Edit/Create the user because token github not change everytime $object = Users::findFirstByTokenGithub($token->accessToken); $this->commonOauthSave($uid, $user, $token, $object, 'Github'); } else { $this->flashSession->error('Invalid Github response. Please try again'); return $this->response->redirect(); } }