Open Closed

Execute custom code after user login / commercial module #6390


User avatar
0
rferrarin created
  • 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

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    You can try this:

    context.Services.ConfigureApplicationCookie(options =>
    {
        options.Events.OnSignedIn = async signedContext =>
        {
            var userId= signedContext.Principal.Identity.FindUserId();
        };
    });
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 23, 2026, 09:57
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.