Open Closed

Concurrent user login in Microservice Template #4080


User avatar
0
imranStem created

I want to integrate the concurrent login feature. I downloaded the sample code from GitHub. I have a microservice template. What is the best practice to integrate the concurrent login feature, with Auth Server or Identity service or any other way?

  • ABP Framework version: v6.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

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

    ? I downloaded the sample code from GitHub.

    What is the sample? Can you share the Github URL?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    imranStem created

    https://github.com/abpframework/abp-samples/tree/master/ConcurrentLogin

    But this sample is integrated with the identity server 4 and the microservice template has OpenID configuration.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    For openiddict

    [Dependency(ReplaceServices = true)]
    [ExposeServices(typeof(TokenController))]
    class MyTokenController : TokenController
    {
        protected override async Task<IActionResult> SetSuccessResultAsync(OpenIddictRequest request, IdentityUser user)
        {
            var userManager = LazyServiceProvider.LazyGetRequiredService<IdentityUserManager>();
            user.SetProperty(ConcurrentLoginConsts.ConcurrentLoginToken, Guid.NewGuid().ToString("N"));
            await UserManager.UpdateAsync(user);
    
            return await base.SetSuccessResultAsync(request, user);
        }
    }
    

    https://github.com/abpframework/abp/blob/a4aba09dc909006ea188f322e73cf56f56fe4616/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/TokenController.Password.cs#L213

    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 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.