Signature Validation Failed ASP.NET

Seem to have resolved the issue of getting the discoveryDocument created by gleaning other posts. Seems the call succeeds if no await and call to .Result thereafter.

However, after (again following the API documentation), and capturing the signing keys from the discoveryDocument variable, getting the error that 'Signature validation failed. nkid:PII is hidden. ntoken:PII is hidden.

Using my own created development environment at Aries Systems-dev-723639.

Application is Aries EM with corresponding client id.

Original request is :
Preformatted text‘testing’&prompt=login&nonce=‘currentnonce’&response_mode=form_postPreformatted text

This brings up a login screen to which I log in with password credential and am returned the token to the callback url.

Validation code is as follows and seems to mimic (almost except for the .Result call after GetConfigurationAsync) what is in the Okta API related to .net JWT token validation:

Preformatted textprivate static async Task ValidateAscoToken(string token)

        var issuer = "";
        var configurationManager = new ConfigurationManager<OpenIdConnectConfiguration>(
            issuer + "/.well-known/oauth-authorization-server",
            new OpenIdConnectConfigurationRetriever(),
            new HttpDocumentRetriever());
        var cancellationToken = default(CancellationToken);
        var discoveryDocument = configurationManager.GetConfigurationAsync(cancellationToken).Result;
        var signingKeys = discoveryDocument.SigningKeys;

        var validationParameters = new TokenValidationParameters
            ValidateIssuer = true,
            ValidIssuer = issuer,
            ValidateIssuerSigningKey = true,
            IssuerSigningKeys = signingKeys,
            ValidateLifetime = true,
            ClockSkew = TimeSpan.FromMinutes(5)

        var principal =
            new JwtSecurityTokenHandler().ValidateToken(token, validationParameters, out var rawValidatedToken);

        return (JwtSecurityToken) rawValidatedToken;
    catch (Exception AnyError)
        var anyError = AnyError;
        return null;
}`Preformatted text`