79338597

Date: 2025-01-08 09:45:33
Score: 0.5
Natty:
Report link

In the end I moved my validation to the ICustomTokenRequestValidator. The validation now happens in the ValidateAsync(CustomTokenRequestValidationContext context). Setting context.Result.IsError = true and populating context.Result.Error and context.Result.ErrorDescription causes the oidc-client-ts to throw an error during log in and I catch this in the SPA. This works for my purposes.

Unfortunately, the validation that I needed to do wasn't as easy as it was in the OnTokenValidated event as I didn't have the necessary information (specifically I needed access to the "id_token_hint"), so it did require some "hacks" to be able to pass the necessary information to the ICustomTokenRequestValidator

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Billy