Identity Reference

OIDC/JWT token claims

Aura Home uses OIDC/JWT tokens supplied by the customer portal through the SDK token callback. The backend validates token issuer, audience, signature, and expiry before protected profile or chat access.

Required Claims

ClaimRequiredPurposeExample
issYesIdentifies the trusted token issuer.https://customer.okta.com/oauth2/default
audYesIdentifies the expected client ID or API audience.aura-home
subYesStable user identifier from the customer identity provider.00u123customer
expYesToken expiry; expired tokens are rejected.1770000000

Recommended Claims

ClaimPurpose
emailUseful for display, customer support, and user lookup workflows.
nameOptional display name for the authenticated user.
iatIssued-at timestamp for diagnostics and token age checks.
nonceRecommended for browser-based OIDC flows to reduce replay risk.

SDK Token Callback

AuraHome.init({
  container: "#aura-home",
  baseUrl: "https://aura.customer-domain.com/",
  auth: {
    mode: "oidc",
    getToken: async () => {
      const token = await customerIdentity.getIdToken();
      return token;
    }
  }
});

Safe Handling Rules

  • Do not put tokens in query strings.
  • Do not place tokens in HTML attributes, CSS variables, logs, analytics payloads, or screenshots.
  • Refresh tokens in the customer identity layer, not inside the Aura Home iframe.
  • Keep token lifetimes short and rely on the portal session for renewal.

Validation Failures

FailureWhat to check
Invalid issuerThe token iss must match the runtime OIDC issuer configuration.
Invalid audienceThe token aud must match the configured client ID or API audience.
Expired tokenRefresh the token before returning it from getToken.
Missing identityConfirm sub is stable and email is present when required by the customer workflow.