diff --git a/apps/proxy-auth/src/app/otp/send-otp/send-otp.component.ts b/apps/proxy-auth/src/app/otp/send-otp/send-otp.component.ts index ff357703..f44e9e96 100644 --- a/apps/proxy-auth/src/app/otp/send-otp/send-otp.component.ts +++ b/apps/proxy-auth/src/app/otp/send-otp/send-otp.component.ts @@ -155,6 +155,7 @@ export class SendOtpComponent extends BaseComponent implements OnInit, OnDestroy if (theme?.theme !== Theme.SYSTEM) { this.theme = theme?.theme || theme; } + this.loginWidgetData = theme?.registerState; this.version = theme?.version || 'v1'; this.input_fields = theme?.input_fields || 'top'; this.show_social_login_icons = theme?.icons || false; @@ -202,11 +203,10 @@ export class SendOtpComponent extends BaseComponent implements OnInit, OnDestroy ); this.otpWidgetService.loadScript(); } - this.loginWidgetData = widgetData?.find( - (widget) => widget?.service_id === FeatureServiceIds.PasswordAuthentication - ); if (!this.loginWidgetData) { - this.loginWidgetData = widgetData[0]; + this.loginWidgetData = widgetData?.find( + (widget) => widget?.service_id === FeatureServiceIds.PasswordAuthentication + ); } }); this.otpWidgetService.otpWidgetToken.pipe(filter(Boolean), takeUntil(this.destroy$)).subscribe((token) => {