Skip to main content
The Self-Service CD app runs as an embedded widget inside the Candescent Online Banking (OLB) shell. Because the member is already authenticated in Candescent when they reach the widget, there is no separate login flow and no additional auth configuration required. Member identity is provided automatically by the @cdx-extensions/di-sdk through a single React hook.

How It Works

When the member clicks the CD tile in their Candescent dashboard, Candescent loads our widget via Module Federation. The widget immediately calls useUserContext() on the SDK singleton — Candescent’s platform injects the authenticated member’s context and the widget receives it without any additional handshake.
Member logs into Candescent OLB
  → clicks CD tile
  → Candescent mounts our widget (Module Federation)
  → widget calls useUserContext()
  → SDK returns member identity from Candescent's active session
  → widget is ready — no auth step needed

Getting the Member Context

import { PlatformSDK } from '@cdx-extensions/di-sdk';

const sdk = PlatformSDK.getInstance();
const { data: user } = sdk.useUserContext();

// user contains:
// {
//   customerId:   "bfdf0fe66b334326b9f89f42c5af445c",
//   memberNumber: "cmauser",
//   fiId:         "2509",         ← maps to which banking core to use
//   firstName:    "John",
//   lastName:     "Doe",
//   email:        "john@email.com",
//   userRole:     "PRIMARY",
//   userType:     "RETAIL"
// }
The fiId field is the key field for our backend — it determines which banking core (Finxact, FIS IBS, Corelation, Fiserv, Symitar) to route requests to for this institution.

Making Authenticated API Calls

All API calls — both to Candescent’s DevEx APIs and to our own Python backend — go through the SDK’s HTTP client. This client is a raw Axios instance (web: v1.14.0) and can call any absolute URL including external domains.
const client = sdk.getHttpClient();

// Call our own Python backend
const cds = await client.get(
  'https://api.nuevesolutions.com/account-management/fetch_user_available_cds'
);

// Call Candescent DevEx APIs
const accounts = await client.get(
  'https://api.candescent.com/digitalbanking/db-accounts/v1/accounts'
);
In production, the Candescent platform handles session authentication internally — the widget code does not need to attach tokens or headers manually.

Applying the FI’s Theme

The widget inherits the financial institution’s visual theme automatically through useBranding(). When embedded in OLB, do not wrap the widget in a ThemeProvider — this would override Candescent’s theme injection.
const { theme: sdkTheme } = sdk.useBranding(brandingId);

// When embedded in OLB (standalone={false}):
//   → DO NOT use ThemeProvider — widget inherits the host app's MUI theme
//   → All MUI components pick up the FI's colors automatically

// When running standalone for local development (standalone={true}):
//   → Use ThemeProvider with sdkTheme for accurate preview

The standalone Prop

Every widget must handle a standalone prop to support local development without being connected to a live Candescent OLB instance.
interface SelfServiceCDWidgetProps {
  standalone?: boolean;
  [key: string]: unknown;
}

export const SelfServiceCDWidget: React.FC<SelfServiceCDWidgetProps> = (props) => {
  const standalone = props.standalone === true;

  // In standalone mode: use ThemeProvider, show dev-only UI
  // In embedded mode: no ThemeProvider, inherit from OLB host
  return standalone ? (
    <ThemeProvider theme={resolveTheme(sdkTheme)}>
      <CssBaseline />
      <CDApp />
    </ThemeProvider>
  ) : (
    <CDApp />
  );
};
Pass standalone={true} only during local development. Never deploy with standalone={true}.

Session Lifecycle

EventBehavior
Member opens CD tileCandescent mounts widget, SDK provides context immediately
Member completes a CD operationWidget signals Candescent to reload the member’s account list
Member navigates away in OLBWidget unmounts cleanly — no session to invalidate
Candescent session expiresOLB handles re-authentication — widget is not involved
The widget has no independent session. It lives and dies with the Candescent OLB session.