Open Closed

Migration to OpenIddict - UserManager.FindByNameAsync no longer called #5424


User avatar
0
vproswicks created

We recently migrated from v7.2 (standard) to v7.3 commercial, and at the same time from Identity Server to OpenIddict.

We use the following to provide our own SignInManager and UserManager for the purpose of responding to various login steps:

        PreConfigure<IdentityBuilder>(identityBuilder =>
        {
            identityBuilder.AddRoleManager<VpxRoleManager>();
            identityBuilder.AddSignInManager<VpxSignInManager>();
            identityBuilder.AddUserManager<VpxUserManager>();
        });

It looks like UserManager.FindByNameAsync is no longer called, or no longer called for every login attempt. We've been hooking that function to perform as-needed synchronisation of user account details from an external source.

Are we missing a configuration step or has the workflow changed and we should be hooking a different function now?

  • ABP Framework version: v7.3.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can try to replace the AbpSignInManager and IdentityUserManager and IdentityRoleManager.

    https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Overriding-Services

  • User Avatar
    0
    vproswicks created

    hi

    You can try to replace the AbpSignInManager and IdentityUserManager and IdentityRoleManager.

    https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Overriding-Services

    Doesn't this already replace the IdentityUserManager with our own?

    identityBuilder.AddUserManager<VpxUserManager>();
    

    Our logs show our user manager IS getting called by Abp, just no longer the FindByNameAsync method.

  • User Avatar
    1
    maliming created
    Support Team Fullstack Developer

    hi

    Some services are injected the Volo.Abp.Identity.IdentityUserManagerso your own will not work.

  • User Avatar
    0
    vproswicks created

    Thankyou, that worked!

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11