@kadanza/extension-sdk
    Preparing search index...

    Interface ConnectOptions

    Options for ExtensionSDK.connect / handshake.

    interface ConnectOptions {
        authTokenAutoRefresh?: boolean;
        authTokenBufferMs?: number;
        routingType?: RoutingType;
        timeoutMs?: number;
    }
    Index
    authTokenAutoRefresh?: boolean

    Enables proactive auth-token refresh. After the handshake, the SDK reads the auth token's Unix-seconds expires value and arms a one-shot timer for expires - authTokenBufferMs; it does not run a polling interval.

    Every successful manual, automatic, or parent-pushed auth-token update cancels the previous timer and schedules a new one from the new auth auth token's expiry. If an automatic request fails, it retries once after 30 seconds while the same auth token is still current and unexpired. ExtensionSDK.destroy clears the timer. Missing or invalid expiry values disable scheduling for that auth token without failing the connection.

    Default: false.

    authTokenBufferMs?: number

    How many milliseconds before auth-token expiry the one-shot refresh timer should fire. Must be finite and non-negative. If the auth token is already inside this buffer when received, refresh is requested immediately.

    Default: 120_000 (2 minutes). Ignored unless authTokenAutoRefresh is enabled.

    routingType?: RoutingType

    Routing mode announced to the parent on HANDSHAKE_INIT. HashRouter SPAs should pass client-hash. Default: server.

    timeoutMs?: number

    Handshake timeout in milliseconds (default 10_000).