0Bit Documentation

Configure embed origins

Allowlist exact browser origins and return URLs before embedding or redirecting to 0Gate.

Origin and return URL configuration protects hosted flows from being mounted or redirected from unapproved web properties. Configure these values before production traffic.

Use exact origins

Treat origin allowlists as security controls. Avoid wildcard thinking, broad domains, temporary tunnel URLs in live mode, or unreviewed customer-controlled redirect targets.

Configuration model

Values to register

ValueExample shapeRule
Local development originhttp://localhost:3000Sandbox only.
Staging originhttps://staging.example.comSeparate from production.
Production originhttps://app.example.comExact scheme and host.
Return URLhttps://app.example.com/checkout/returnServer-backed status page.
Cancel URLhttps://app.example.com/checkout/cancelServer-backed retry or close page.

Implementation checklist

  1. List every web origin that will mount the widget.
  2. List every return and cancel URL that 0Gate can redirect to.
  3. Separate sandbox, staging, and production values.
  4. Remove tunnel, preview, and test URLs before launch.
  5. Keep outcome pages server-backed so they read trusted state.
const allowedReturnUrls = new Set([
  'https://app.example.com/checkout/return',
  'https://app.example.com/checkout/cancel',
]);

function assertReturnUrl(url: string) {
  if (!allowedReturnUrls.has(url)) {
    throw new Error('return_url_not_allowed');
  }
}

On this page