fix login verify method
This commit is contained in:
parent
01506e126d
commit
c62d048fba
2 changed files with 3 additions and 5 deletions
|
|
@ -4,8 +4,8 @@ import { Setting } from '../../Database';
|
|||
import { verify } from 'react-native-b-crypt-bridge';
|
||||
|
||||
class LoginController {
|
||||
verify(user, password) {
|
||||
return verify(password, user.password);
|
||||
async verify(user, password) {
|
||||
return await verify(password, user.password);
|
||||
}
|
||||
|
||||
login(user) {
|
||||
|
|
|
|||
|
|
@ -122,9 +122,7 @@ class LoginScreen extends React.Component {
|
|||
Alert.alert(i18n.t('error.error'), i18n.t('error.incorrect_credentials'));
|
||||
return;
|
||||
}
|
||||
const verified = LoginController.verify(user, password).then(
|
||||
verified => verified,
|
||||
);
|
||||
const verified = await LoginController.verify(user, password);
|
||||
if (!verified) {
|
||||
Alert.alert(i18n.t('error.error'), i18n.t('error.incorrect_credentials'));
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue