Record successful 2FA authentication in session cookie
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:
@ -258,7 +258,7 @@ pub async fn reset_password_route(
|
||||
|
||||
let user_id = SessionIdentity(id.as_ref()).user_id();
|
||||
|
||||
// Check if user is setting a new password
|
||||
// Check if user is setting a new password
|
||||
if let Some(req) = &req {
|
||||
if req.password.len() < MIN_PASS_LEN {
|
||||
danger = Some("Password is too short!".to_string());
|
||||
@ -408,7 +408,9 @@ pub async fn login_with_otp(
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
SessionIdentity(id.as_ref()).set_status(&http_req, SessionStatus::SignedIn);
|
||||
let session = SessionIdentity(id.as_ref());
|
||||
session.record_2fa_auth(&http_req);
|
||||
session.set_status(&http_req, SessionStatus::SignedIn);
|
||||
logger.log(Action::OTPLoginAttempt {
|
||||
success: true,
|
||||
user: &user,
|
||||
|
Reference in New Issue
Block a user