From 40a7042d3a4a23da659bd2767e19d3b8e1966ef6 Mon Sep 17 00:00:00 2001 From: Brion Date: Tue, 23 Dec 2025 10:04:27 +0530 Subject: [PATCH 1/2] Gracefully handle missing component mappings --- packages/javascript/src/models/v2/embedded-flow-v2.ts | 6 ++++++ .../components/presentation/auth/AuthOptionFactory.tsx | 9 +++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/javascript/src/models/v2/embedded-flow-v2.ts b/packages/javascript/src/models/v2/embedded-flow-v2.ts index fffc4716..32f5e4f6 100644 --- a/packages/javascript/src/models/v2/embedded-flow-v2.ts +++ b/packages/javascript/src/models/v2/embedded-flow-v2.ts @@ -47,6 +47,12 @@ export enum EmbeddedFlowComponentType { /** Email input field with validation for email addresses. */ EmailInput = 'EMAIL_INPUT', + /** One-time password input field for multi-factor authentication */ + OtpInput = 'OTP_INPUT', + + /** Phone number input field with country code support */ + PhoneInput = 'PHONE_INPUT', + /** Text display component for labels, headings, and messages */ Text = 'TEXT', diff --git a/packages/react/src/components/presentation/auth/AuthOptionFactory.tsx b/packages/react/src/components/presentation/auth/AuthOptionFactory.tsx index a498ad15..5eee3c7e 100644 --- a/packages/react/src/components/presentation/auth/AuthOptionFactory.tsx +++ b/packages/react/src/components/presentation/auth/AuthOptionFactory.tsx @@ -265,12 +265,9 @@ const createAuthComponentFromFlow = ( } default: - throw new AsgardeoRuntimeError( - `Unsupported component type: ${component.type}`, - `${authType === 'signin' ? 'SignIn' : 'SignUp'}-UnsupportedComponentType-001`, - 'react', - `Something went wrong while rendering the ${authType} component. Please try again later.`, - ); + // Gracefully handle unsupported component types by returning null + console.warn(`Unsupported component type: ${component.type}. Skipping render.`); + return null; } }; From d89a096446bda73661798d40d318ea90f4d7c9af Mon Sep 17 00:00:00 2001 From: Brion Date: Tue, 23 Dec 2025 10:05:05 +0530 Subject: [PATCH 2/2] =?UTF-8?q?Add=20changeset=20=F0=9F=A6=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/rich-forks-tickle.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/rich-forks-tickle.md diff --git a/.changeset/rich-forks-tickle.md b/.changeset/rich-forks-tickle.md new file mode 100644 index 00000000..a09274ba --- /dev/null +++ b/.changeset/rich-forks-tickle.md @@ -0,0 +1,6 @@ +--- +'@asgardeo/javascript': patch +'@asgardeo/react': patch +--- + +Fix component type issues