From f9e674591a874a5512bdf145c38a76b1973df2b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=99=E5=AD=A6=E6=9D=B0?= Date: Mon, 18 Feb 2019 15:16:03 +0800 Subject: [PATCH] Update PdAuthServiceProvider.php --- src/PdAuthServiceProvider.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/PdAuthServiceProvider.php b/src/PdAuthServiceProvider.php index 53ec01b..4f87910 100644 --- a/src/PdAuthServiceProvider.php +++ b/src/PdAuthServiceProvider.php @@ -70,15 +70,14 @@ class PdAuthServiceProvider extends ServiceProvider }); $this->app['router']->get('api/auth/logout', function (Request $request) { - $token = $request->header('Authorization', $request->cookie(Authenticate::CookieName)); $cookie = new Cookie(Authenticate::CookieName, '', time()); - app('pd.auth')->logout($token); return response()->json([ 'code' => 0, 'message' => '', - 'data' => [], + 'data' => [ + 'url' => isDev() ? 'http://auth.dev.haowumc.com/logout' : 'https://auth.int.haowumc.com/logout' + ], ])->withCookie($cookie); - }); }