[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 <noreply@anthropic.com>
This commit is contained in:
parent
e7745d18b9
commit
85803d92fe
@ -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,
|
||||
|
||||
@ -88,6 +88,12 @@ export interface Session {
|
||||
userAgent?: string;
|
||||
ipAddress?: string;
|
||||
deviceInfo?: Record<string, unknown>;
|
||||
deviceType?: string;
|
||||
deviceName?: string;
|
||||
browser?: string;
|
||||
os?: string;
|
||||
countryCode?: string;
|
||||
city?: string;
|
||||
expiresAt: Date;
|
||||
revokedAt?: Date;
|
||||
createdAt: Date;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user