Skip to content

Commit

Permalink
Fix log message when Apple ID token validation fails
Browse files Browse the repository at this point in the history
Fix the issuer and audience parameters in log message being the wrong way around.
Log the Apple ID that failed token validation at trace, rather than in the error log message.
Resolves #381.
  • Loading branch information
martincostello committed Feb 13, 2020
1 parent d0fb02e commit 451d8b9
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,13 @@ public override async Task ValidateAsync([NotNull] AppleValidateIdTokenContext c
{
_logger.LogError(
ex,
"Apple ID token validation failed for issuer {TokenIssuer} and audience {TokenAudience}. ID Token: {IdToken}",
parameters.ValidAudience,
"Apple ID token validation failed for issuer {TokenIssuer} and audience {TokenAudience}.",
parameters.ValidIssuer,
parameters.ValidAudience);

_logger.LogTrace(
ex,
"Apple ID token {IdToken} could not be validated.",
context.IdToken);

throw;
Expand Down

0 comments on commit 451d8b9

Please sign in to comment.