I want to implement the concurrent user login and I checked many articles and found that to update the SecurityStamp to invalidate the previous login. So I want to update the security token when user login into the system
I have written below code and override the token controller.
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(TokenController))]
public class MyTokenController : TokenController
{
protected override async Task<IActionResult> SetSuccessResultAsync(OpenIddictRequest request, IdentityUser user)
{
var userManager = LazyServiceProvider.LazyGetRequiredService<IdentityUserManager>();
await userManager.UpdateSecurityStampAsync(user);
return await base.SetSuccessResultAsync(request, user);
}
}
Its updating the securityStamp on each login but token is not invalidated for previous same user login.
- ABP Framework version: v7.0.1
- UI Type: Angular
- Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Exception message and full stack trace:
- Steps to reproduce the issue:
4 Answer(s)
-
0
Hi
could you please check these links https://support.abp.io/QA/Questions/3047/Disable-concurrent-user-login
https://support.abp.io/QA/Questions/950/How-to-allow-one-user-concurrent-login-per-user
https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4821
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
The above links are not helpful, I am using the ABP framework 7.0.1 with microservice template and openIdDict, not identity server. I have updated the securitystamp on each login which should validate and invalidated the previous token.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi
Currently this feature is not implement in ABP if you can do it in a simple aspnetcore openiddict angular project then you can apply the same logic here.
let me know if you face any issue specific to abp implemenation.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)