In this case, what is the signing key used for and/or why is it required?
As explained in the post you mentioned, the signing key is only used to sign the JWT tokens issued by OpenIddict (which includes the identity tokens + the access tokens if you opted for JWT).
If you want to replicate the "ephemeral encryption/validation key" scenario with the default token format, you can ask OpenIddict to use an ephemeral data protector:
public class Startup
{
private readonly IDataProtectionProvider _provider =
new EphemeralDataProtectionProvider();
public void ConfigureServices(IServiceCollection services)
{
services.AddOpenIddict(options =>
{
// ...
options.UseDataProtectionProvider(_provider);
});
}
public void Configure(IApplicationBuilder app)
{
app.UseOAuthValidation(options =>
{
options.DataProtectionProvider = _provider;
});
app.UseOpenIddict();
}
}
You can also override the Data Protection options to use an ephemeral data protector for your entire application:
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddDataProtection()
.UseEphemeralDataProtectionProvider();
services.AddOpenIddict();
}
public void Configure(IApplicationBuilder app)
{
app.UseOAuthValidation();
app.UseOpenIddict();
}
}
It's worth noting that the signing key requirement was relaxed in the recent bits: registering a certificate or an ephemeral key is no longer necessary, except if you decide to use JWT access tokens or enable the implicit flow. So if you're using the password flow, adding a key is no longer mandatory.