Skip to content

Commit

Permalink
Remove auth-request deletion (#5184)
Browse files Browse the repository at this point in the history
2FA is needed to login even when using login-with-device.
If the user didn't saved the 2FA token they still need to provide this.
We deleted the auth-request after validation the request, but before 2FA was triggered.

Removing the deletion of this record from that point as it will get cleaned-up automatically anyways.

Signed-off-by: BlackDex <black.dex@gmail.com>
  • Loading branch information
BlackDex authored Nov 12, 2024
1 parent ba48ca6 commit e927b8a
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/api/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@ async fn _password_login(
)
};

// Delete the request after we used it
auth_request.delete(conn).await?;

if auth_request.user_uuid != user.uuid
|| !auth_request.approved.unwrap_or(false)
|| ip.ip.to_string() != auth_request.request_ip
Expand Down

0 comments on commit e927b8a

Please sign in to comment.