0
jean@groovejones.com created
The following lambda code:
PreConfigure<OpenIddictBuilder>(builder =>
{
// THIS IS CALLED TWICE
builder.AddValidation(options =>
{
options.AddAudiences("AbpSolution1");
options.UseLocalServer();
options.UseAspNetCore();
});
});
is called twice. This is the code provided by ABP template. This is problematic because I want to attach handler in there and it is being called more than once.
// If I add this, then my event handler is added twice.
builder.AddServer(options =>
{
options.AllowDeviceCodeFlow();
options.AddEventHandler(ScanScopedHandler.Descriptor);
});
Can you please provide a fix or a workaround?
- UI Type: Angular / MVC /8.3.3
- Template: app
- Created ABP Studio Version: 0.9.6
- Tiered: No
- UI Framework: mvc
- Theme: leptonx
- Theme Style: system
- Database Provider: ef
- Database Management System: postgresql
- Separate Tenant Schema: No
- Mobile Framework: none
- Public Website: No
- Optional Modules:
- GDPR
- TextTemplateManagement
- LanguageManagement
- AuditLogging
- SaaS
- OpenIddictAdmin
1 Answer(s)
-
0
Hi,
We will fix it. https://github.com/abpframework/abp/issues/21377
you can use this way as a temporary Solution
public static bool IsOpenIddictBuilderConfigured = false; public override void PreConfigureServices(ServiceConfigurationContext context) { var hostingEnvironment = context.Services.GetHostingEnvironment(); var configuration = context.Services.GetConfiguration(); PreConfigure<OpenIddictBuilder>(builder => { if (!IsOpenIddictBuilderConfigured) { builder.AddValidation(options => { options.AddAudiences("Qa"); options.UseLocalServer(); options.UseAspNetCore(); }); IsOpenIddictBuilderConfigured = true; } }) }