Commit afc8f14
committed
WEB-1032: fix 2FA email OTP not working in login
The two-factor-authentication component uses ChangeDetectionStrategy.OnPush
but never calls markForCheck() after its asynchronous state updates, so the
view was never refreshed:
- Delivery methods loaded via getDeliveryMethods().subscribe() were never
rendered, so the login screen showed "Please select a delivery method:"
with no radio options and a permanently-disabled "Request OTP" button.
- otpRequested / tokenValidityTime set after requestOTP() never revealed
the OTP entry field.
- loading / resendOTPLoading spinner states were also not reflected.
Inject ChangeDetectorRef and call markForCheck() after each async state
mutation (delivery-method load, requestOTP, validateOTP, resendOTP).
Verified end-to-end against the 2fa.mifos.community backend and a local
Fineract instance: the email delivery method now renders, the Request
OTP button enables on selection, and the OTP entry field appears.1 parent ac714b3 commit afc8f14
1 file changed
Lines changed: 9 additions & 1 deletion
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| 75 | + | |
| 76 | + | |
74 | 77 | | |
75 | 78 | | |
76 | 79 | | |
| |||
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
| 105 | + | |
| 106 | + | |
101 | 107 | | |
102 | 108 | | |
103 | 109 | | |
| |||
116 | 122 | | |
117 | 123 | | |
118 | 124 | | |
| 125 | + | |
119 | 126 | | |
120 | 127 | | |
121 | 128 | | |
| |||
136 | 143 | | |
137 | 144 | | |
138 | 145 | | |
| 146 | + | |
139 | 147 | | |
140 | 148 | | |
141 | 149 | | |
| |||
0 commit comments