IdentityServer 4: nenhum mecanismo de armazenamento para concessões especificado - use AddInMemoryStores

Estou usando o Identity Server 4, ASP.NET Core e tentando substituir o desenvolvedor do IdentityServer no ambiente de produção. Mas obtendo o seguinte erro:

No storage mechanism for grants specified. Use the 'AddInMemoryStores' extension method to register a development version.

Então, tentei implementar os serviços mencionados nestaresponda:

IProfileServiceIResourceOwnerPasswordValidator

Este é meuConfigureServices Método emComece classe:

            services.AddMvc();
            var identityBuilder = services.AddIdentityServer();
            identityBuilder.AddInMemoryScopes(identitySrvConfig.GetScopes());
            identityBuilder.AddInMemoryClients(identitySrvConfig.GetClients());
            identityBuilder.AddProfileService<ProfileService>();
            identityBuilder.Services.AddTransient<IResourceOwnerPasswordValidator, ResourceOwnerPasswordValidator>();

Levando em consideração que, no meu caso, a assinatura da interface é diferente:

 public class ResourceOwnerPasswordValidator : IdentityServer4.Validation.IResourceOwnerPasswordValidator
{
    public Task ValidateAsync(ResourceOwnerPasswordValidationContext context)
    {
        throw new NotImplementedException();
    }
}

Mas ainda estou recebendo o mesmo erro, qual é o problema?

questionAnswers(2)

yourAnswerToTheQuestion