Fix UserAuthenticated

This commit is contained in:
Haiping Chen 2024-11-05 06:02:17 -06:00
parent 822d1ae77a
commit d4ccc53a6e
2 changed files with 3 additions and 2 deletions

View file

@ -25,9 +25,10 @@ public interface IAuthenticationHook
/// <summary>
/// User authenticated successfully
/// </summary>
/// <param name="user"></param>
/// <param name="token"></param>
/// <returns></returns>
bool UserAuthenticated(JwtSecurityToken token)
bool UserAuthenticated(User user, Token token)
=> true;
/// <summary>

View file

@ -296,7 +296,7 @@ public class UserService : IUserService
var (token, jwt) = BuildToken(record);
foreach (var hook in hooks)
{
hook.UserAuthenticated(jwt);
hook.UserAuthenticated(record, token);
}
return token;