Skip to main content
The bridge requires minimal configuration. In most cases, auto-detection handles everything.

Bridge options

Options are passed to NativeBridge.getInstance() (or to <BridgeProvider options={...}> in React).
All fields are optional.

environment

Override automatic environment detection. Useful for testing or debugging.
In production, omit this — the bridge auto-detects the environment.

channel

Inject a custom MessageChannel implementation for testing.

iframeAllowedOrigins

An allowlist of origins for incoming postMessage events. Only applies to iframe transport.
If empty (default), all origins are accepted. In production, always specify allowed origins for iframe embeddings.

iframeTargetOrigin

The target origin for outgoing postMessage calls. Only applies to iframe transport.
Defaults to window.location.origin. Set this explicitly when the parent frame is on a different origin.

Timeouts

React configuration

Pass options to <BridgeProvider>:
The discoverOnMount prop controls whether discoverCapabilities() runs automatically:

No API keys or tokens required

The bridge itself does not require API keys, base URLs, or authentication tokens. It is a transport layer between the web app and its host. Any authentication or configuration for GBG GO services is handled separately by the application layer.