I am adding OpenIdConnect to my app like so:
.AddOpenIdConnect("oidc", options =>
{
var clientSecret = Configuration.GetValue<string>("clientSecret");
options.ClientSecret = clientSecret;
});
I'd like to be able to use another service to get the secret like this:
.AddOpenIdConnect("oidc", (services, options) =>
{
var secretService = services.GetService<ISecretService>();
var clientSecret = secretService.Get("clientSecret");
options.ClientSecret = clientSecret;
});
I saw there is use of app.UseOpenIdConnectAuthentication
but I don't see it in the nuget package.
I have the following installed:
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="3.1.0" />
How can I do this?