From a0ed6da24d1b6ca14a3b46c46ccaa65f6c712daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=99=E5=AD=A6=E6=9D=B0?= Date: Fri, 4 May 2018 16:58:07 +0800 Subject: [PATCH] cookie path --- src/PdAuth/Middleware/Authenticate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PdAuth/Middleware/Authenticate.php b/src/PdAuth/Middleware/Authenticate.php index b0225ed..d19b1d6 100644 --- a/src/PdAuth/Middleware/Authenticate.php +++ b/src/PdAuth/Middleware/Authenticate.php @@ -44,7 +44,7 @@ class Authenticate if ($code) { $token = app('pd.auth')->getAccessToken($code); if (isset($token['access_token'])) { - setcookie(self::CookieName, $token['access_token'], strtotime($token['expired_at'])); + setcookie(self::CookieName, $token['access_token'], strtotime($token['expired_at']), '/'); $qs = $request->getQueryString(); $params = explode('&', $qs);