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.urlstringFull endpoint URL. Mutually exclusive with baseUrl
config.baseUrlstringThunderID base URL
config.payloadEmbeddedFlowExecuteRequestConfigV2Flow request body
config.payload.applicationIdstringApplication ID. Required for the first step
config.payload.flowTypestringMust be 'USER_ONBOARDING' for the first step
config.payload.executionIdstringExecution ID from a prior response
config.payload.inputsRecord<string, string>Step input values
config.payload.challengeTokenstringChallenge 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
failureReasonstringPresent when flowStatus is Error

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
ThunderID LogoThunderID Logo

Product

DocsAPIsSDKs
© WSO2 LLC. All rights reserved.Privacy PolicyCookie Policy