Loading auth/oauth2/facebook_token.php +3 −2 Original line number Diff line number Diff line Loading @@ -37,8 +37,9 @@ $fb = new Facebook\Facebook([ ]); $helper = $fb->getRedirectLoginHelper(); if (isset($_GET['state'])) { $helper->getPersistentDataHandler()->set('state', $_GET['state']); $state = filter_input(INPUT_GET, 'search', FILTER_SANITIZE_STRING); if ($state !== null) { $helper->getPersistentDataHandler()->set('state', $state); } try { Loading auth/oauth2/google_token.php +4 −3 Original line number Diff line number Diff line Loading @@ -44,9 +44,10 @@ if (isset($_REQUEST['logout'])) { unset($_SESSION['access_token']); } if (isset($_GET['code'])) { $code = filter_input(INPUT_GET, 'code', FILTER_SANITIZE_STRING); if ($code !== null) { // An access token has been returned from the auth URL. $client->authenticate($_GET['code']); $client->authenticate($code); $_SESSION['access_token'] = $client->getAccessToken(); } Loading @@ -63,7 +64,7 @@ if ($client->getAccessToken()) { $res = $service->people->get('people/me', array('requestMask.includeField' => 'person.names,person.email_addresses')); } catch (Google_Service_Exception $e) { echo '<p>' . json_encode($e->getErrors()) . '</p>'; $thisPage = $PROTOCOL . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; $thisPage = $PROTOCOL . $_SERVER['HTTP_HOST'] . htmlspecialchars($_SERVER["PHP_SELF"], ENT_QUOTES, "utf-8"); echo '<p><a href="' . $thisPage . '?logout">Click here to unset the access token</a></p>'; } Loading Loading
auth/oauth2/facebook_token.php +3 −2 Original line number Diff line number Diff line Loading @@ -37,8 +37,9 @@ $fb = new Facebook\Facebook([ ]); $helper = $fb->getRedirectLoginHelper(); if (isset($_GET['state'])) { $helper->getPersistentDataHandler()->set('state', $_GET['state']); $state = filter_input(INPUT_GET, 'search', FILTER_SANITIZE_STRING); if ($state !== null) { $helper->getPersistentDataHandler()->set('state', $state); } try { Loading
auth/oauth2/google_token.php +4 −3 Original line number Diff line number Diff line Loading @@ -44,9 +44,10 @@ if (isset($_REQUEST['logout'])) { unset($_SESSION['access_token']); } if (isset($_GET['code'])) { $code = filter_input(INPUT_GET, 'code', FILTER_SANITIZE_STRING); if ($code !== null) { // An access token has been returned from the auth URL. $client->authenticate($_GET['code']); $client->authenticate($code); $_SESSION['access_token'] = $client->getAccessToken(); } Loading @@ -63,7 +64,7 @@ if ($client->getAccessToken()) { $res = $service->people->get('people/me', array('requestMask.includeField' => 'person.names,person.email_addresses')); } catch (Google_Service_Exception $e) { echo '<p>' . json_encode($e->getErrors()) . '</p>'; $thisPage = $PROTOCOL . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; $thisPage = $PROTOCOL . $_SERVER['HTTP_HOST'] . htmlspecialchars($_SERVER["PHP_SELF"], ENT_QUOTES, "utf-8"); echo '<p><a href="' . $thisPage . '?logout">Click here to unset the access token</a></p>'; } Loading