Skip to main content
The Connect SDK adds the account picker to your website. Your backend creates a short-lived session, then the SDK opens the hosted picker in a secured iframe. You do not build or copy an iframe yourself.
Hosted Connect is a preview. The sandbox host is https://trdrsco-connect-sandbox.fly.dev. Production access and the final public host require approval before launch.

Before you start

  1. Create a Venue key with connect:manage in your sandbox back office.
  2. Add the exact website origin under Developers → Connect websites. Paths and wildcards are not accepted.
  3. Keep the Venue key on your server. Only the short-lived Connect token goes to the browser.

1. Create a session on your server

This route must run on your backend. Replace the venue id and email with the trader opening Connect.
server.js
The token lasts for at most ten minutes, belongs to one venue, one environment, one approved origin, and one intended email.

2. Open Connect in the browser

Import the browser module, request a token from your backend, and call open(). The SDK creates and removes the iframe for you.
index.html

Events

Calling close() removes the iframe. Calling open() again needs a new session token after the old session completes or expires.

Redirect instead of an iframe

Use connect.redirect() when an embedded dialog does not fit your application, such as a small mobile web view. Connect returns to the current page after the hosted flow.

Read the result from your backend

The browser event is for interface feedback. Your backend can read the authoritative session result:
The response is redacted. It never returns provider credentials, browser handoff tokens, or another trader’s account.

Security rules

  • Never put a Venue key in JavaScript, HTML, a mobile bundle, or a Connect URL.
  • Register exact origins. https://app.example.com and https://admin.example.com are different origins.
  • Create the session for the signed-in trader’s real email. A different TRDRS user cannot claim it.
  • Treat connected as interface feedback and confirm important work from your backend.
  • Use a fresh idempotency key when you intentionally create a new session.