diff --git a/packages/web/src/session/utils.ts b/packages/web/src/session/utils.ts index 03e66935..9afd77a7 100644 --- a/packages/web/src/session/utils.ts +++ b/packages/web/src/session/utils.ts @@ -16,7 +16,7 @@ * */ import { SessionState } from './types' -import { SESSION_DURATION_SECONDS, SESSION_ID_LENGTH } from './constants' +import { SESSION_DURATION_MS, SESSION_ID_LENGTH } from './constants' export const isSessionState = (maybeSessionState: unknown): maybeSessionState is SessionState => typeof maybeSessionState === 'object' && @@ -29,7 +29,7 @@ export const isSessionState = (maybeSessionState: unknown): maybeSessionState is export const isSessionDurationExceeded = (sessionState: SessionState): boolean => { const now = Date.now() - return sessionState.startTime > now || now > sessionState.startTime + SESSION_DURATION_SECONDS + return sessionState.startTime > now || now > sessionState.startTime + SESSION_DURATION_MS } export const isSessionInactivityTimeoutReached = (sessionState: SessionState): boolean => {