[FIX] totp (#131)
This commit is contained in:
parent
af5c3efbd2
commit
b2ace37c99
|
@ -62,22 +62,23 @@ class LoginView extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderTOTP = () => {
|
renderTOTP = () => {
|
||||||
if (!this.props.login.failure || this.props.login.error.error !== 'totp-required') {
|
if (/totp/ig.test(this.props.login.error.error)) {
|
||||||
return null;
|
return (
|
||||||
|
<TextInput
|
||||||
|
ref={ref => this.codeInput = ref}
|
||||||
|
style={styles.input_white}
|
||||||
|
onChangeText={code => this.setState({ code })}
|
||||||
|
keyboardType='numeric'
|
||||||
|
autoCorrect={false}
|
||||||
|
returnKeyType='done'
|
||||||
|
autoCapitalize='none'
|
||||||
|
onSubmitEditing={this.submit}
|
||||||
|
placeholder='Code'
|
||||||
|
underlineColorAndroid='transparent'
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return (
|
return null;
|
||||||
<TextInput
|
|
||||||
ref={ref => this.codeInput = ref}
|
|
||||||
style={styles.input_white}
|
|
||||||
onChangeText={code => this.setState({ code })}
|
|
||||||
keyboardType='numeric'
|
|
||||||
autoCorrect={false}
|
|
||||||
returnKeyType='done'
|
|
||||||
autoCapitalize='none'
|
|
||||||
onSubmitEditing={this.submit}
|
|
||||||
placeholder='Code'
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// {this.props.login.isFetching && <Text> LOGANDO</Text>}
|
// {this.props.login.isFetching && <Text> LOGANDO</Text>}
|
||||||
|
|
Loading…
Reference in New Issue