• Checks if an authentication window is currently open

    Determines whether an authentication flow is in progress by checking if the window exists and has not been destroyed. This can be used to prevent starting multiple authentication flows simultaneously.

    Returns boolean

    True if an authentication window exists and is open

    // Only start auth if no window is already open
    if (!hasActiveAuthWindow()) {
    startAuthFlow();
    }
    export function hasActiveAuthWindow(): boolean {
    return authWindow !== null && !authWindow.isDestroyed();
    }