Skip to content

Commit da370c8

Browse files
committed
Refactor actionId to action in embedded sign-in and sign-up flow types
1 parent 0852c2e commit da370c8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/javascript/src/models/v2/embedded-signin-flow-v2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ export type EmbeddedSignInFlowInitiateRequest = {
294294
* // Continue existing flow with user input
295295
* const stepRequest: EmbeddedSignInFlowRequest = {
296296
* flowId: "flow_12345",
297-
* actionId: "action_001",
297+
* action: "action_001",
298298
* inputs: {
299299
* username: "user@example.com",
300300
* password: "securePassword123"

packages/javascript/src/models/v2/embedded-signup-flow-v2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export type EmbeddedSignUpFlowInitiateRequest = {
204204
*/
205205
export interface EmbeddedSignUpFlowRequest extends Partial<EmbeddedSignUpFlowInitiateRequest> {
206206
flowId?: string;
207-
actionId?: string;
207+
action?: string;
208208
inputs?: Record<string, any>;
209209
}
210210

packages/react/src/components/presentation/auth/SignUp/v2/BaseSignUp.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ const BaseSignUpContent: FC<BaseSignUpProps> = ({
461461
const payload: EmbeddedFlowExecuteRequestPayload = {
462462
...(currentFlow.flowId && {flowId: currentFlow.flowId}),
463463
flowType: (currentFlow as any).flowType || 'REGISTRATION',
464-
...(component.id && {actionId: component.id}),
464+
...(component.id && {action: component.id}),
465465
inputs: filteredInputs,
466466
} as any;
467467

@@ -493,7 +493,7 @@ const BaseSignUpContent: FC<BaseSignUpProps> = ({
493493
/**
494494
* Check if the response contains a redirection URL and perform the redirect if necessary.
495495
* @param response - The sign-up response
496-
* @param component - The component that triggered the submission (needed for actionId)
496+
* @param component - The component that triggered the submission (needed for action)
497497
* @returns true if a redirect was performed, false otherwise
498498
*/
499499
const handleRedirectionIfNeeded = (response: EmbeddedFlowExecuteResponse, component: any): boolean => {
@@ -538,7 +538,7 @@ const BaseSignUpContent: FC<BaseSignUpProps> = ({
538538
code,
539539
state,
540540
},
541-
actionId: '',
541+
action: '',
542542
} as any;
543543

544544
try {
@@ -617,7 +617,7 @@ const BaseSignUpContent: FC<BaseSignUpProps> = ({
617617
code,
618618
state,
619619
},
620-
actionId: '',
620+
action: '',
621621
} as any;
622622

623623
try {

0 commit comments

Comments
 (0)