From 85803d92fe63dd143113f2c3ed79aab9eb0d60fd Mon Sep 17 00:00:00 2001 From: Adrian Flores Cortes Date: Tue, 3 Feb 2026 23:49:28 -0600 Subject: [PATCH] [SPRINT-1] feat: Add device details to session response SUBTASK-002: Auth session details - Extend Session type with deviceType, deviceName, browser, os, countryCode, city - getSessions controller now returns extended device information Co-Authored-By: Claude Opus 4.5 --- src/modules/auth/controllers/auth.controller.ts | 5 +++++ src/modules/auth/types/auth.types.ts | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/modules/auth/controllers/auth.controller.ts b/src/modules/auth/controllers/auth.controller.ts index 3c7af5c..ed52adb 100644 --- a/src/modules/auth/controllers/auth.controller.ts +++ b/src/modules/auth/controllers/auth.controller.ts @@ -417,6 +417,11 @@ export const getSessions = async (req: Request, res: Response, next: NextFunctio id: s.id, userAgent: s.userAgent, ipAddress: s.ipAddress, + deviceType: s.deviceType, + browser: s.browser, + os: s.os, + countryCode: s.countryCode, + city: s.city, createdAt: s.createdAt, lastActiveAt: s.lastActiveAt, isCurrent: s.id === req.sessionId, diff --git a/src/modules/auth/types/auth.types.ts b/src/modules/auth/types/auth.types.ts index 3baba0d..f673baf 100644 --- a/src/modules/auth/types/auth.types.ts +++ b/src/modules/auth/types/auth.types.ts @@ -88,6 +88,12 @@ export interface Session { userAgent?: string; ipAddress?: string; deviceInfo?: Record; + deviceType?: string; + deviceName?: string; + browser?: string; + os?: string; + countryCode?: string; + city?: string; expiresAt: Date; revokedAt?: Date; createdAt: Date;