• Gets the current refresh timer

    Retrieves the NodeJS Timeout object for the scheduled token refresh operation, which can be used to check if a refresh is already scheduled.

    Returns null | Timeout

    Current refresh timer or null if no refresh is scheduled

    // Check if refresh is already scheduled before scheduling a new one
    if (!getRefreshTimer()) {
    scheduleTokenRefresh(expiresIn);
    }
    export function getRefreshTimer(): NodeJS.Timeout | null {
    return refreshTimer;
    }