खुला हुआ बंद किया हुआ

Execute custom code after user login / commercial module #6390


User avatar
0
rferrarin बनाया था
  • ABP Framework version: v7.4.4
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server)
  • **Tiered: no

Hi, I need to execute some custom code after the user has succesfully logged in the system (basically I need to load some user-dependent constants) I couldn't find any info about doing this, can you help me? Best regards


1 उत्तर (ओं)
  • User Avatar
    0
    liangshiwei बनाया था
    सहायता दल Fullstack Developer

    You can try this:

    context.Services.ConfigureApplicationCookie(options =>
    {
        options.Events.OnSignedIn = async signedContext =>
        {
            var userId= signedContext.Principal.Identity.FindUserId();
        };
    });
    
Made with ❤️ on ABP v8.2.0-preview Updated on मार्च 25, 2024, 15:11