Ends in:
2 DAYS
5 HRS
10 MIN
48 SEC
Ends in:
2 D
5 H
10 M
48 S
Open Closed

The requested service 'Volo.Abp.AspNetCore.Authentication.OpenIdConnect.IOpenIdLocalUserCreationClient' has not been registered. #4414


User avatar
0
alin.andersen created

Hey,

I have a custom Oidc Login Provider (KeyCloak) and I get this after the login Provider redirect me after successful login:

ComponentNotRegisteredException: The requested service 'Volo.Abp.AspNetCore.Authentication.OpenIdConnect.IOpenIdLocalUserCreationClient' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.

Am i missing a dependency or how can I register this missing component? I cant find anything on Google about this.

Thanks!

  • ABP Framework version: v6.0.0
  • UI type: Blazor
  • DB provider: EF Core

3 Answer(s)
  • User Avatar
    0
    alin.andersen created

    We are using the Single Layer Application Template.

    This is currently in my module:

    [DependsOn(
        // ABP Framework packages
        typeof(AbpAspNetCoreMvcModule),
        typeof(AbpAutofacModule),
        typeof(AbpAutoMapperModule),
        typeof(AbpSwashbuckleModule),
        typeof(AbpAspNetCoreSerilogModule),
        typeof(AbpEntityFrameworkCoreMySQLModule),
        typeof(VoloAbpCommercialSuiteTemplatesModule),
    
        // LeptonX Theme module packages
        typeof(AbpAspNetCoreMvcUiLeptonXThemeModule),
        typeof(AbpAspNetCoreComponentsServerLeptonXThemeModule),
    
        // Account module packages
        typeof(AbpAccountPublicWebOpenIddictModule),
        typeof(AbpAccountPublicHttpApiModule),
        typeof(AbpAccountPublicApplicationModule),
    
        typeof(AbpAccountAdminBlazorServerModule),
        typeof(AbpAccountAdminHttpApiModule),
        typeof(AbpAccountAdminApplicationModule),
    
        // Identity module packages
        typeof(AbpPermissionManagementDomainIdentityModule),
        typeof(AbpPermissionManagementDomainOpenIddictModule),
        typeof(AbpIdentityProBlazorServerModule),
        typeof(AbpIdentityHttpApiModule),
        typeof(AbpIdentityApplicationModule),
        typeof(AbpIdentityProEntityFrameworkCoreModule),
    
        typeof(AbpOpenIddictProBlazorServerModule),
        typeof(AbpOpenIddictProHttpApiModule),
        typeof(AbpOpenIddictProApplicationModule),
        typeof(AbpOpenIddictEntityFrameworkCoreModule),
    
        // Audit logging module packages
        typeof(AbpAuditLoggingBlazorServerModule),
        typeof(AbpAuditLoggingHttpApiModule),
        typeof(AbpAuditLoggingApplicationModule),
        typeof(AbpAuditLoggingEntityFrameworkCoreModule),
    
        // Permission Management module packages
        typeof(AbpPermissionManagementBlazorServerModule),
        typeof(AbpPermissionManagementApplicationModule),
        typeof(AbpPermissionManagementHttpApiModule),
        typeof(AbpPermissionManagementEntityFrameworkCoreModule),
    
        // Saas Management module packages
        typeof(SaasHostBlazorServerModule),
        typeof(SaasHostHttpApiModule),
        typeof(SaasHostApplicationModule),
        typeof(SaasEntityFrameworkCoreModule),
    
        // Feature Management module packages
        typeof(AbpFeatureManagementBlazorServerModule),
        typeof(AbpFeatureManagementHttpApiModule),
        typeof(AbpFeatureManagementApplicationModule),
        typeof(AbpFeatureManagementEntityFrameworkCoreModule),
    
        // Setting Management module packages
        typeof(AbpSettingManagementBlazorServerModule),
        typeof(AbpSettingManagementHttpApiModule),
        typeof(AbpSettingManagementApplicationModule),
        typeof(AbpSettingManagementEntityFrameworkCoreModule),
    
        // Text Template Management module packages
        typeof(TextTemplateManagementBlazorServerModule),
        typeof(TextTemplateManagementHttpApiModule),
        typeof(TextTemplateManagementApplicationModule),
        typeof(TextTemplateManagementEntityFrameworkCoreModule),
    
        // Language Management module packages
        typeof(LanguageManagementBlazorServerModule),
        typeof(LanguageManagementHttpApiModule),
        typeof(LanguageManagementApplicationModule),
        typeof(LanguageManagementEntityFrameworkCoreModule),
    
        // GDPR module packages
        typeof(AbpGdprBlazorServerModule),
        typeof(AbpGdprHttpApiModule),
        typeof(AbpGdprApplicationModule),
        typeof(AbpGdprEntityFrameworkCoreModule),
    
        // Blob Storing
        typeof(BlobStoringDatabaseEntityFrameworkCoreModule)
    )]
    
    Autofac.Core.Registration.ComponentNotRegisteredException: The requested service 'Volo.Abp.AspNetCore.Authentication.OpenIdConnect.IOpenIdLocalUserCreationClient' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
       at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
       at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
       at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
       at Microsoft.Extensions.DependencyInjection.AbpOpenIdConnectExtensions.<>c.<<AddAbpOpenIdConnect>b__3_4>d.MoveNext()
    --- End of stack trace from previous location ---
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.RunTokenValidatedEventAsync(OpenIdConnectMessage authorizationResponse, OpenIdConnectMessage tokenEndpointResponse, ClaimsPrincipal user, AuthenticationProperties properties, JwtSecurityToken jwt, String nonce)
       at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I have a custom Oidc Login Provider (KeyCloak) and I get this after the login Provider redirect me after successful login:

    Try to depend on theAbpAspNetCoreAuthenticationOpenIdConnectModule

    If still not working, Please share your code to reproduce the problem.

  • User Avatar
    0
    alin.andersen created

    Yes thank you that was the missing module.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35