Skip to main content

User Onboarding Flow (V2)

executeEmbeddedUserOnboardingFlowV2 drives a post-sign-in onboarding sequence (e.g., profile completion, consent collection) without a browser redirect.

executeEmbeddedUserOnboardingFlowV2(config)​

Initiate or advance a V2 user onboarding flow.

import { executeEmbeddedUserOnboardingFlowV2, EmbeddedSignUpFlowStatusV2 } from '@thunderid/javascript'

// Step 1 — Initiate onboarding
const step1 = await executeEmbeddedUserOnboardingFlowV2({
baseUrl: 'https://localhost:8090',
payload: {
applicationId: '<your-app-id>',
flowType: 'USER_ONBOARDING',
},
})

// Step 2 — Complete profile
const step2 = await executeEmbeddedUserOnboardingFlowV2({
baseUrl: 'https://localhost:8090',
payload: {
executionId: step1.executionId,
inputs: {
'http://wso2.org/claims/mobile': '+1-555-0100',
},
},
})

Parameters​

ParameterTypeRequiredDescription
config.urlstring✅Full endpoint URL. Mutually exclusive with baseUrl
config.baseUrlstring✅ThunderID base URL
config.payloadEmbeddedFlowExecuteRequestConfigV2✅Flow request body
config.payload.applicationIdstringNoApplication ID. Required for the first step
config.payload.flowTypestringNoMust be 'USER_ONBOARDING' for the first step
config.payload.executionIdstringNoExecution ID from a prior response
config.payload.inputsRecord<string, string>NoStep input values
config.payload.challengeTokenstringNoChallenge token from a prior step

Response: EmbeddedUserOnboardingFlowResponse​

PropertyTypeDescription
executionIdstringID to pass in subsequent requests
flowStatusEmbeddedSignUpFlowStatusV2Current flow status
typestringView or Redirection
dataEmbeddedFlowResponseDataV2Component tree for the current step
errorFlowErrorPresent when flowStatus is Error or Incomplete. Contains code, message, and description

V2 Component Model​

All V2 flow responses share a common component model for building custom UI.

EmbeddedFlowResponseDataV2​

PropertyTypeDescription
componentsEmbeddedFlowComponentV2[]Top-level UI components to render

EmbeddedFlowComponentV2​

PropertyTypeDescription
idstringComponent identifier
typeEmbeddedFlowComponentTypeV2Component type
componentsEmbeddedFlowComponentV2[]Nested child components
configRecord<string, unknown>Component-specific configuration (label, placeholder, etc.)
variantstringVisual variant

EmbeddedFlowComponentTypeV2​

ValueDescription
ButtonInteractive button
CheckboxCheckbox input
DividerVisual divider
FormForm container
ImageImage element
InputText/password/email input
RadioRadio button
SelectDropdown select
TypographyDisplay text

EmbeddedFlowActionVariantV2​

ValueDescription
PrimaryPrimary action (e.g., submit)
SecondarySecondary action (e.g., cancel)
SocialSocial login button
TextText-only action link

EmbeddedFlowEventTypeV2​

ValueDescription
SubmitForm submission
ClickButton click
ChangeInput value change

Explore with AI

ThunderID LogoThunderID Logo

Product

DocsAPIsSDKs
© Copyright Linux Foundation Europe.For web site terms of use, trademark policy and other project policies please see https://linuxfoundation.eu/en/policies.