diff --git a/auth/linkedin/callback.php b/auth/linkedin/callback.php index 53ff3ed..b8fec58 100644 --- a/auth/linkedin/callback.php +++ b/auth/linkedin/callback.php @@ -68,6 +68,10 @@ function getInfo($url, $access_token) return $info; } +if ($_GET['state'] != $state) { + die('hack'); +} + //$access_token = getAccessToken($_GET['code']); -dump($GLOBALS); \ No newline at end of file +dump($_SESSION); \ No newline at end of file diff --git a/auth/linkedin/index.php b/auth/linkedin/index.php index d86d728..9fe06b1 100644 --- a/auth/linkedin/index.php +++ b/auth/linkedin/index.php @@ -6,6 +6,9 @@ * Time: 15:17 */ +session_start(); +$_SESSION['auth_name'] = '小小'; + require_once "./function.php"; // get_code_url = "https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=81cc4t9fuu9bpu&redirect_uri=https%3A%2F%2Ffengyuexingzi.top%2Fauth%2Flinkedin&state=Wf6tYXQ7y86iRulBOC%2FUXraHneM%3D&scope=r_fullprofile%20r_emailaddress%20w_share";