add better logging for when IdP returns errors.

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2024-07-30 11:57:35 -06:00
parent 86ec9409c3
commit dae8ab679e

View File

@@ -159,6 +159,11 @@ namespace CarCareTracker.Controllers
} else
{
_logger.LogInformation("OpenID Provider did not provide a valid id_token");
if (!string.IsNullOrWhiteSpace(tokenResult))
{
//if something was returned from the IdP but it's invalid, we want to log it as an error.
_logger.LogError($"Expected id_token, received {tokenResult}");
}
}
} else
{