fix: 다중 기기 로그인 지원

- 로그인 시 기존 리프레시 토큰 삭제 로직 제거
- 각 기기에서 독립적으로 세션 유지 가능
- 기존 단일 기기 정책으로 인한 강제 로그아웃 문제 해결

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-01-15 20:23:07 +09:00
parent fa6e96dcbc
commit e4993e30af

View File

@@ -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');