File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
react/src/components/presentation/auth Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,12 @@ export enum EmbeddedFlowComponentType {
4747 /** Email input field with validation for email addresses. */
4848 EmailInput = 'EMAIL_INPUT' ,
4949
50+ /** One-time password input field for multi-factor authentication */
51+ OtpInput = 'OTP_INPUT' ,
52+
53+ /** Phone number input field with country code support */
54+ PhoneInput = 'PHONE_INPUT' ,
55+
5056 /** Text display component for labels, headings, and messages */
5157 Text = 'TEXT' ,
5258
Original file line number Diff line number Diff line change @@ -265,12 +265,9 @@ const createAuthComponentFromFlow = (
265265 }
266266
267267 default :
268- throw new AsgardeoRuntimeError (
269- `Unsupported component type: ${ component . type } ` ,
270- `${ authType === 'signin' ? 'SignIn' : 'SignUp' } -UnsupportedComponentType-001` ,
271- 'react' ,
272- `Something went wrong while rendering the ${ authType } component. Please try again later.` ,
273- ) ;
268+ // Gracefully handle unsupported component types by returning null
269+ console . warn ( `Unsupported component type: ${ component . type } . Skipping render.` ) ;
270+ return null ;
274271 }
275272} ;
276273
You can’t perform that action at this time.
0 commit comments