fix failed saltRequest (#4554)
* fix failed saltRequest * improve requestSalt error handling Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
This commit is contained in:
parent
75f0d60dff
commit
8203a2fdeb
1 changed files with 26 additions and 4 deletions
|
@ -162,18 +162,40 @@ export class SessionCommands {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
case webClient.protobuf.controller.Response.ResponseCode.RespRegistrationRequired: {
|
case webClient.protobuf.controller.Response.ResponseCode.RespRegistrationRequired: {
|
||||||
SessionCommands.updateStatus(StatusEnum.DISCONNECTED, 'Login failed: incorrect username or password');
|
SessionCommands.updateStatus(StatusEnum.DISCONNECTED, 'Login failed: registration required');
|
||||||
SessionCommands.disconnect();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
SessionCommands.updateStatus(StatusEnum.DISCONNECTED, 'Login failed: Unknown Reason');
|
SessionCommands.updateStatus(StatusEnum.DISCONNECTED, 'Login failed: Unknown Reason');
|
||||||
SessionCommands.disconnect();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (webClient.options.reason) {
|
||||||
|
case WebSocketConnectReason.REGISTER: {
|
||||||
|
SessionPersistence.registrationFailed('Failed to retrieve password salt');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case WebSocketConnectReason.ACTIVATE_ACCOUNT: {
|
||||||
|
SessionPersistence.accountActivationFailed();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case WebSocketConnectReason.PASSWORD_RESET: {
|
||||||
|
SessionPersistence.resetPasswordFailed();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case WebSocketConnectReason.LOGIN:
|
||||||
|
default: {
|
||||||
|
SessionPersistence.loginFailed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SessionCommands.disconnect();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue