Dupplicate AbpUserLogin records
See original GitHub issue- Your Abp package version: 6.3
- Your base framework: .Net Core
- Exception message and stack trace if available.
- Steps needed to reproduce the problem.
Issue:
I think records in the AbpUserLogins
table should have a unique combination of ProviderKey + TenantId (I don’t think LoginProvider should be included?)
Steps to reproduce:
Call the TokenAuthController.ExternalAuthenticate twice (in a short period) to trigger the case AbpLoginResultType.UnknownExternalLogin
This will register the user twice with the same ProviderKey / TenantId.
LoginProvider | ProviderKey | TenantId | UserId |
---|---|---|---|
Auth0 | google-oauth2|123 | 1 | 6 |
Auth0 | google-oauth2|123 | 1 | 5 |
Expected result: The second record should not exist / it should throw an exception
Expected solution: Add a unique constraint on these two fields.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Multiple duplicate records inserted into AbpUsers table on ...
In one instance multiple duplicate records were inserted into the AbpUsers table on calling /account/register from a remote client. image. In ...
Read more >Duplicate CmsUser insertion #3779 | Support Center
A user can't login from the unified login page, because a duplicate Id insertion into table CmsUsers is tried and the result is...
Read more >Get rid of login page after authenticate on auth server ...
I'm working on ABP framework version 7+ using OpenIddict as auth server with Angular UI. Well, when I try to log in at...
Read more >Articles Tutorials | AspNet Boilerplate
The AbpUser class defines some base properties. Some of the properties are: UserName: Login name of the user. Should be unique for a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@StefanKoenen sorry, I got it wrong, you are right 👍
Yes, you need to remove records manually. You can keep the last one by looking at the biggest ID for each duplicate record set.