User can delete his own 2FA login history
This commit is contained in:
src
templates/settings
@ -120,3 +120,15 @@ pub async fn delete_factor(
|
||||
HttpResponse::Ok().body("Removed factor!")
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn clear_login_history(
|
||||
user: CurrentUser,
|
||||
users: web::Data<Addr<UsersActor>>,
|
||||
) -> impl Responder {
|
||||
users
|
||||
.send(users_actor::Clear2FALoginHistory(user.uid.clone()))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
HttpResponse::Ok().body("History successfully cleared")
|
||||
}
|
||||
|
Reference in New Issue
Block a user