I am getting a nice warning in my logs when the code is invalid from L1712
warn: Microsoft.AspNetCore.Identity.UserManager[9]
VerifyUserTokenAsync() failed with purpose: ResetPassword for user 21248592.
However it does not tell me what the error is in the error message is. I have had to add this in my own code.
dbug:IdentityServer.Controllers.Account.AccountController[2150]
User invite failed for [User: 21248592] [error: Invalid token.]
Which basically means i have two log entries for the same issue. It would be nice to get a list of the errors from the result into the warning message.
Can i suggest something like this? I would be happy to submit a pull request if you like
if (!result)
{
var errors = string.Join(", ", result.Errors.Select(a => a.Description));
Logger.LogWarning(9, "VerifyUserTokenAsync() failed with purpose: {purpose} for user {userId}.
Errors {errors }", purpose, await GetUserIdAsync(user), errors );
}
I am getting a nice warning in my logs when the code is invalid from L1712
However it does not tell me what the error is in the error message is. I have had to add this in my own code.
Which basically means i have two log entries for the same issue. It would be nice to get a list of the errors from the result into the warning message.
Can i suggest something like this? I would be happy to submit a pull request if you like