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);