Accept future OTP code
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -38,9 +38,10 @@ pub async fn save_totp_factor(
|
||||
|
||||
if !key.check_code(&form.first_code).unwrap_or(false) {
|
||||
return HttpResponse::BadRequest().body(format!(
|
||||
"Given code is invalid (expected {} or {})!",
|
||||
"Given code is invalid (expected {}, {} or {})!",
|
||||
key.previous_code().unwrap_or_default(),
|
||||
key.current_code().unwrap_or_default(),
|
||||
key.previous_code().unwrap_or_default()
|
||||
key.following_code().unwrap_or_default(),
|
||||
));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user