Skip to main content

Embedded Sign-Up Flow (V2)

executeEmbeddedSignUpFlowV2 drives a step-by-step user registration flow using the V2 protocol.

executeEmbeddedSignUpFlowV2(config)​

Initiate or advance a V2 embedded registration flow.

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

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

// Step 2 — Provide registration details
const step2 = await executeEmbeddedSignUpFlowV2({
baseUrl: 'https://localhost:8090',
payload: {
executionId: step1.executionId,
inputs: {
username: 'newuser@example.com',
password: 'SecurePass123!',
'http://wso2.org/claims/givenname': 'New',
'http://wso2.org/claims/lastname': 'User',
},
},
})

if (step2.flowStatus === EmbeddedSignUpFlowStatusV2.Complete) {
// Registration complete — redirect or sign in
}

Parameters​

ParameterTypeRequiredDescription
config.urlstring✅Full endpoint URL. Mutually exclusive with baseUrl
config.baseUrlstring✅ThunderID base URL
config.payloadEmbeddedSignUpFlowRequestV2✅Flow request body
config.payload.applicationIdstring❌Application ID. Required for the first step
config.payload.flowTypestring❌Flow type. Required for the first step (e.g., 'REGISTRATION')
config.payload.executionIdstring❌Execution ID from a prior response
config.payload.actionstring❌Action to perform at the current step
config.payload.inputsRecord<string, string>❌Registration field values
config.payload.challengeTokenstring❌Challenge token for verification steps
config.authIdstring❌Optional authentication context ID

Response: EmbeddedSignUpFlowResponseV2​

PropertyTypeDescription
executionIdstringID to pass in subsequent requests
flowStatusEmbeddedSignUpFlowStatusV2Current flow status
typeEmbeddedSignUpFlowTypeV2View or Redirection
dataEmbeddedFlowResponseDataV2Component tree or redirect data
challengeTokenstringPresent when a verification step is required
redirectUrlstringPresent when type is Redirection
errorFlowExecutionErrorPresent when flowStatus is Error. Contains code, message, and description

Enums​

EmbeddedSignUpFlowStatusV2​

ValueDescription
IncompleteMore steps required
CompleteRegistration completed successfully
ErrorRegistration failed, check error for details

EmbeddedSignUpFlowTypeV2​

ValueDescription
ViewRender the component tree in data
RedirectionRedirect to redirectUrl

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.