@@ -24,6 +24,7 @@ import {
2424 EmbeddedFlowResponseType ,
2525 withVendorCSSClassPrefix ,
2626 AsgardeoAPIError ,
27+ Platform ,
2728} from '@asgardeo/browser' ;
2829import { cx } from '@emotion/css' ;
2930import { FC , ReactElement , ReactNode , useEffect , useState , useCallback , useRef } from 'react' ;
@@ -34,6 +35,7 @@ import useFlow from '../../../contexts/Flow/useFlow';
3435import { useForm , FormField } from '../../../hooks/useForm' ;
3536import useTranslation from '../../../hooks/useTranslation' ;
3637import useTheme from '../../../contexts/Theme/useTheme' ;
38+ import useAsgardeo from '../../../contexts/Asgardeo/useAsgardeo' ;
3739import Alert from '../../primitives/Alert/Alert' ;
3840import Card , { CardProps } from '../../primitives/Card/Card' ;
3941import Logo from '../../primitives/Logo/Logo' ;
@@ -309,6 +311,7 @@ const BaseSignUpContent: FC<BaseSignUpProps> = ({
309311 const { theme, colorScheme} = useTheme ( ) ;
310312 const { t} = useTranslation ( ) ;
311313 const { subtitle : flowSubtitle , title : flowTitle , messages : flowMessages , addMessage, clearMessages} = useFlow ( ) ;
314+ const { platform} = useAsgardeo ( ) ;
312315 const styles = useStyles ( theme , colorScheme ) ;
313316
314317 /**
@@ -484,11 +487,16 @@ const BaseSignUpContent: FC<BaseSignUpProps> = ({
484487 } ) ;
485488 }
486489
490+ // For AsgardeoV2 platform, use actionId from component.config, otherwise use component.id
491+ const actionId = platform === Platform . AsgardeoV2
492+ ? component . config ?. actionId
493+ : component . id ;
494+
487495 const payload : EmbeddedFlowExecuteRequestPayload = {
488496 ...( currentFlow . flowId && { flowId : currentFlow . flowId } ) ,
489497 flowType : ( currentFlow as any ) . flowType || 'REGISTRATION' ,
490498 inputs : filteredInputs ,
491- actionId : component . id ,
499+ ... ( actionId && { actionId : actionId as string } ) ,
492500 } as any ;
493501
494502 const rawResponse = await onSubmit ( payload ) ;
0 commit comments