public function post_authorize() { $this->filter('before', 'oauth2'); $header = array('X-Frame-Options' => 'DENY'); $oauth = new OAuth2Server\Libraries\OAuth2(new OAuth2StorageLaravel()); $input = Input::all(); $input['response_type'] = 'code'; // Here you can set default type or optional params try { $auth_params = $oauth->getAuthorizeParams($input); } catch (OAuth2Server\Libraries\OAuth2ServerException $oauthError) { $oauthError->sendHttpResponse(); } //$oauth->finishClientAuthorization(true, 123 , $auth_params); $oauth->finishClientAuthorization(true, Auth::User()->id, $auth_params); }