check response in all cases
This commit is contained in:
parent
d41c4d16d4
commit
e0ff13e193
|
@ -124,13 +124,14 @@ export class LoginCommand {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const twoFactorResponse = await this.authService.logInTwoFactor(selectedProvider.type,
|
response = await this.authService.logInTwoFactor(selectedProvider.type,
|
||||||
twoFactorToken, false);
|
twoFactorToken, false);
|
||||||
if (twoFactorResponse.twoFactor) {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response.twoFactor) {
|
||||||
return Response.error('Login failed.');
|
return Response.error('Login failed.');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
await this.syncService.fullSync(true);
|
await this.syncService.fullSync(true);
|
||||||
const res = new MessageResponse('You are logged in!', '\n' +
|
const res = new MessageResponse('You are logged in!', '\n' +
|
||||||
|
|
Loading…
Reference in New Issue