add other login results
This commit is contained in:
parent
4a90c146e5
commit
748c9b01d0
1 changed files with 20 additions and 0 deletions
|
@ -182,6 +182,26 @@ impl UserLogin {
|
|||
return LoginResult::TooManyAttempts;
|
||||
}
|
||||
|
||||
if login_resp.message.contains("Incorrect login") {
|
||||
return LoginResult::BadCredentials;
|
||||
}
|
||||
|
||||
if login_resp.captcha_needed {
|
||||
return LoginResult::NeedCaptcha;
|
||||
}
|
||||
|
||||
if login_resp.emailauth_needed {
|
||||
return LoginResult::NeedEmail;
|
||||
}
|
||||
|
||||
if login_resp.requires_twofactor {
|
||||
return LoginResult::Need2FA;
|
||||
}
|
||||
|
||||
if !login_resp.login_complete {
|
||||
return LoginResult::BadCredentials;
|
||||
}
|
||||
|
||||
|
||||
return LoginResult::OtherFailure;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue