File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -317,9 +317,8 @@ export default class AuthUtils {
317317 throw new AuthenticationError ( EnumStatusCode . ERROR_NOT_AUTHENTICATED , 'Refresh token expired' ) ;
318318 }
319319
320- // The session expiration is relative to the creation time.
321- // If the session doesn't have a creation timestamp, fall back to "now".
322- const baseMs = userSession . createdAt ?. getTime ( ) ?? Date . now ( ) ;
320+ // The session expiration is relative to the creation time
321+ const baseMs = userSession . createdAt . getTime ( ) ;
323322 const expiresAtMs = baseMs + DEFAULT_SESSION_MAX_AGE_SEC * 1000 ;
324323 const sessionExpiresDate = new Date ( expiresAtMs ) ;
325324 const remainingSeconds = Math . max ( 0 , Math . floor ( ( expiresAtMs - Date . now ( ) ) / 1000 ) ) ;
You can’t perform that action at this time.
0 commit comments