Skip to content
Snippets Groups Projects
Unverified Commit b2ace37c authored by Guilherme Gazzo's avatar Guilherme Gazzo Committed by GitHub
Browse files

[FIX] totp (#131)

parent af5c3efb
No related branches found
No related tags found
No related merge requests found
......@@ -62,22 +62,23 @@ class LoginView extends React.Component {
}
renderTOTP = () => {
if (!this.props.login.failure || this.props.login.error.error !== 'totp-required') {
return null;
if (/totp/ig.test(this.props.login.error.error)) {
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 (
<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'
/>
);
return null;
}
// {this.props.login.isFetching && <Text> LOGANDO</Text>}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment