Parcourir la source

fix: token2login not working

Tokumeikoi il y a 4 ans
Parent
commit
1116c7ef28
1 fichiers modifiés avec 1 ajouts et 2 suppressions
  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)
     public function token2Login(Request $request)
     {
     {
         if ($request->input('token')) {
         if ($request->input('token')) {
@@ -154,7 +153,7 @@ class AuthController extends Controller
             } else {
             } else {
                 $location = url($redirect);
                 $location = url($redirect);
             }
             }
-            return header('Location:' . $location);
+            return redirect()->to($location)->send();
         }
         }
 
 
         if ($request->input('verify')) {
         if ($request->input('verify')) {