From 7bf03b4d30983294a4343c416f7225a11fbf2e8d Mon Sep 17 00:00:00 2001 From: fengyuexingzi Date: Wed, 13 Jun 2018 15:11:37 +0800 Subject: [PATCH] ssl --- auth/linkedin/callback.php | 4 +++- auth/linkedin/index.php | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/auth/linkedin/callback.php b/auth/linkedin/callback.php index f5e96ee..d90d969 100644 --- a/auth/linkedin/callback.php +++ b/auth/linkedin/callback.php @@ -92,4 +92,6 @@ unset($_SESSION['state']); $info = getInfo(); //$info = json_encode($info); -header("Location: https://fengyuexingzi.top/auth/linkedin?access_token=${info}"); +$_SESSION['info'] = $info; + +header("Location: https://fengyuexingzi.top/auth/linkedin"); diff --git a/auth/linkedin/index.php b/auth/linkedin/index.php index 74dcea6..4d8bdac 100644 --- a/auth/linkedin/index.php +++ b/auth/linkedin/index.php @@ -14,6 +14,10 @@ $state = base64_encode(openssl_random_pseudo_bytes(20)); session_start(); $_SESSION['state'] = $state; +if (isset($_SESSION['info'])) { + dump($_SESSION['info']); +} + function getCodeUrl() { $url = 'https://www.linkedin.com/oauth/v2/authorization?';