fly 5 年之前
父節點
當前提交
d0275def82

+ 2 - 1
app/Http/Controllers/QuickApp/Oauth/UsersController.php

@@ -86,7 +86,8 @@ class UsersController extends Controller
         try {
             $old_token = JWTAuth::getToken();
             $token = JWTAuth::refresh($old_token);
-            $time = strtotime("+1 month");
+            // $time = strtotime("+1 month");
+            $time = strtotime("+60 seconds");
             return response()->success(compact('token', 'time'));
         } catch (JWTException $e) {
             return response()->error('QAPP_NOT_LOGIN');

+ 2 - 1
app/Modules/User/Services/QappUserService.php

@@ -35,7 +35,8 @@ class QappUserService
         }
         $user = $qapp_user->user;
         $uid = $user->id;
-        $time = strtotime("+1 month");
+        // $time = strtotime("+1 month");
+        $time = strtotime("+60 seconds");
         $token = JWTAuth::fromUser($user);
         if ($data['send_order_id']) {
             UserService::setUserSendOrderStatic($uid, $data['send_order_id']);

+ 2 - 2
config/jwt.php

@@ -33,7 +33,7 @@ return [
     |
     */
 
-    'ttl' => 43200,
+    'ttl' => 1,
 
     /*
     |--------------------------------------------------------------------------
@@ -47,7 +47,7 @@ return [
     |
     */
 
-    'refresh_ttl' => 43200,
+    'refresh_ttl' => 1,
 
     /*
     |--------------------------------------------------------------------------