Browse Source

fix: token2login not working

Tokumeikoi 4 years ago
parent
commit
1116c7ef28
1 changed files with 1 additions and 2 deletions
  1. 1 2
      app/Http/Controllers/Passport/AuthController.php

+ 1 - 2
app/Http/Controllers/Passport/AuthController.php

@@ -144,7 +144,6 @@ class AuthController extends Controller
         ]);
     }
 
-    // 准备废弃
     public function token2Login(Request $request)
     {
         if ($request->input('token')) {
@@ -154,7 +153,7 @@ class AuthController extends Controller
             } else {
                 $location = url($redirect);
             }
-            return header('Location:' . $location);
+            return redirect()->to($location)->send();
         }
 
         if ($request->input('verify')) {