@@ -12,13 +12,13 @@ import { OtpDataType, TotpDataType } from '../types';
1212import { AuthorizerTOTPScanner } from './AuthorizerTOTPScanner' ;
1313
1414const initOtpData : OtpDataType = {
15- isScreenVisible : false ,
15+ is_screen_visible : false ,
1616 email : '' ,
1717 phone_number : '' ,
1818} ;
1919
2020const initTotpData : TotpDataType = {
21- isScreenVisible : false ,
21+ is_screen_visible : false ,
2222 email : '' ,
2323 phone_number : '' ,
2424 authenticator_scanner_image : '' ,
@@ -85,7 +85,7 @@ export const AuthorizerBasicAuthLogin: FC<{
8585 res . authenticator_recovery_codes
8686 ) {
8787 setTotpData ( {
88- isScreenVisible : true ,
88+ is_screen_visible : true ,
8989 email : data . email || `` ,
9090 phone_number : data . phone_number || `` ,
9191 authenticator_scanner_image : res . authenticator_scanner_image ,
@@ -101,9 +101,10 @@ export const AuthorizerBasicAuthLogin: FC<{
101101 res ?. should_show_totp_screen )
102102 ) {
103103 setOtpData ( {
104- isScreenVisible : true ,
104+ is_screen_visible : true ,
105105 email : data . email || `` ,
106106 phone_number : data . phone_number || `` ,
107+ is_totp : res ?. should_show_totp_screen || false ,
107108 } ) ;
108109 return ;
109110 }
@@ -163,7 +164,7 @@ export const AuthorizerBasicAuthLogin: FC<{
163164 }
164165 } , [ formData . password ] ) ;
165166
166- if ( totpData . isScreenVisible ) {
167+ if ( totpData . is_screen_visible ) {
167168 return (
168169 < AuthorizerTOTPScanner
169170 { ...{
@@ -181,14 +182,15 @@ export const AuthorizerBasicAuthLogin: FC<{
181182 ) ;
182183 }
183184
184- if ( otpData . isScreenVisible ) {
185+ if ( otpData . is_screen_visible ) {
185186 return (
186187 < AuthorizerVerifyOtp
187188 { ...{
188189 setView,
189190 onLogin,
190191 email : otpData . email || `` ,
191192 phone_number : otpData . phone_number || `` ,
193+ is_totp : otpData . is_totp || false ,
192194 } }
193195 urlProps = { urlProps }
194196 />
@@ -207,7 +209,7 @@ export const AuthorizerBasicAuthLogin: FC<{
207209 className = { styles [ 'form-input-label' ] }
208210 htmlFor = "authorizer-login-email"
209211 >
210- < span > * </ span > Email
212+ < span > * </ span > Email / Phone Number
211213 </ label >
212214 < input
213215 name = "email_or_phone_number"
0 commit comments