From 5a87d59d3038bf1ea90de061179f21ec535a3025 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 28 Dec 2019 17:34:08 +0800 Subject: [PATCH] update --- app/Http/Controllers/Passport/LoginController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Passport/LoginController.php b/app/Http/Controllers/Passport/LoginController.php index 2ea42f4d..fb7bddf0 100755 --- a/app/Http/Controllers/Passport/LoginController.php +++ b/app/Http/Controllers/Passport/LoginController.php @@ -42,10 +42,11 @@ class LoginController extends Controller if (!$user) { return header('Location:' . config('v2board.app_url')); } - $key = 'token2Login_' . Helper::guid(); + $code = Helper::guid(); + $key = 'token2Login_' . $code; Redis::set($key, $user->id); Redis::expire($key, 600); - $redirect = '/#/login?verify='. $key .'&redirect=' . ($request->input('redirect') ? $request->input('redirect') : 'dashboard'); + $redirect = '/#/login?verify='. $code .'&redirect=' . ($request->input('redirect') ? $request->input('redirect') : 'dashboard'); if (config('v2board.app_url')) { $location = config('v2board.app_url') . $redirect; } else {