question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ismcagdascommented, May 29, 2021

@StefanKoenen sorry, I got it wrong, you are right 👍

0reactions
ismcagdascommented, Nov 16, 2022

Yes, you need to remove records manually. You can keep the last one by looking at the biggest ID for each duplicate record set.

Read more comments on GitHub >

github_iconTop 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 >
General MOC FAQs
Can I receive a duplicate certificate?
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found