Skip to content

Commit

Permalink
raise UserLoginSuccessEvent when logging in with 2fa or recovery code
Browse files Browse the repository at this point in the history
  • Loading branch information
bakk committed Mar 8, 2024
1 parent 4feea1a commit 804dd8a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ public async Task<IActionResult> LoginWithRecoveryCode(LoginWithRecoveryCodeView

if (result.Succeeded)
{
await _events.RaiseAsync(new UserLoginSuccessEvent(user.UserName, user.Id.ToString(), user.UserName));
return LocalRedirect(string.IsNullOrEmpty(model.ReturnUrl) ? "~/" : model.ReturnUrl);
}

Expand Down Expand Up @@ -573,6 +574,7 @@ public async Task<IActionResult> LoginWith2fa(LoginWith2faViewModel model)

if (result.Succeeded)
{
await _events.RaiseAsync(new UserLoginSuccessEvent(user.UserName, user.Id.ToString(), user.UserName));
return LocalRedirect(string.IsNullOrEmpty(model.ReturnUrl) ? "~/" : model.ReturnUrl);
}

Expand Down

0 comments on commit 804dd8a

Please sign in to comment.