From e4993e30af1069b861a247091f66d1c91227cadd Mon Sep 17 00:00:00 2001 From: kent Date: Thu, 15 Jan 2026 20:23:07 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=8B=A4=EC=A4=91=20=EA=B8=B0=EA=B8=B0?= =?UTF-8?q?=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=A7=80=EC=9B=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 로그인 시 기존 리프레시 토큰 삭제 로직 제거 - 각 기기에서 독립적으로 세션 유지 가능 - 기존 단일 기기 정책으로 인한 강제 로그아웃 문제 해결 Co-Authored-By: Claude --- app/Services/AuthService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Services/AuthService.php b/app/Services/AuthService.php index 8245804..f131ce4 100644 --- a/app/Services/AuthService.php +++ b/app/Services/AuthService.php @@ -15,8 +15,9 @@ class AuthService */ public static function issueTokens(User $user): array { - // 기존 리프레시 토큰 삭제 (한 사용자당 하나의 리프레시 토큰만 유지) - $user->tokens()->where('name', 'refresh-token')->delete(); + // 다중 기기 로그인 지원: 기존 리프레시 토큰을 삭제하지 않음 + // 각 기기에서 독립적으로 토큰 유지 가능 + // (기존 단일 기기 정책 제거 - 2026-01-15) // 액세스 토큰 만료 시간 (분 단위, null이면 무제한) $accessExpiration = Config::get('sanctum.access_token_expiration');