Merge/Deduplicate/Combine user accounts
-
Hello! I'm considering using FusionAuth for my products but there's a "must-have" I haven't figured out how to accomplish.
Within my target audience, it's very common for people to have multiple email addresses and using different emails on different times. As such, it's very commont that one person ends up with multiple accounts in my app, and we have to manually merge both accounts into a single one.
I need a way for the users themselves to merge their accounts. For instance, we could send a code for email1 and another code for email2, and if the user types in both codes, we know it's one person and then we can merge the accounts.
I know it's possible to do that with both AWS Cognito and Auth0, but I couldn't figure out (from reading the docs) if it's possible with FusionAuth.
Can someone advise on that, please?
-
@jose-0 Hiya,
I'm not sure I totally understand your use case, but this should be doable using the APIs and some code. But it isn't going to be available out of the box.
If I were to do this, I'd build a page which let a user supply two email addresses and specify which one should be primary.
Then I'd write some code to send a random number to each email address and have them enter the number on that same page.
If the codes were correctly entered, I'd presume that the user was the same (all they really proved is that they had access to each of the email inboxes, though. If you wanted more assurance, you could use step up auth). Then you can use the User API to:
- update the primary account with any data that should be moved. I'd definitely move the secondary email (perhaps in an array on the
user.data
field). They won't be able to use this email address to log in any more, but it still might be useful for your support staff or to display in your UX - lock the secondary account so it is not usable any more.
None of this is out of the box with FusionAuth, but building on the APIs it should absolutely be possible.
Hope that helps, thanks for using FusionAuth!
- update the primary account with any data that should be moved. I'd definitely move the secondary email (perhaps in an array on the