Skip to content

Commit

Permalink
Merge pull request #202 from bakk/fix-userloginevent
Browse files Browse the repository at this point in the history
raise UserLoginSuccessEvent when logging in with 2fa or recovery code
  • Loading branch information
skoruba authored Mar 10, 2024
2 parents b245505 + 804dd8a commit f27aade
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 f27aade

Please sign in to comment.