# webAuth.signup does not detect email conflicts when an existing user was created through a social identity provider

**URL:** <https://community.auth0.com/t/webauth-signup-does-not-detect-email-conflicts-when-an-existing-user-was-created-through-a-social-identity-provider/39994>\
**Category:** Get Help\
**Tags:** auth0\
**Created:** [March 26, 2020, 2:57pm UTC](https://community.auth0.com/t/webauth-signup-does-not-detect-email-conflicts-when-an-existing-user-was-created-through-a-social-identity-provider/39994 "2020-03-26T14:57:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![asalem](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/asalem/32/20084_2.png) [@asalem](https://community.auth0.com/u/asalem)\
**Post date:** [March 26, 2020, 2:57pm UTC](https://community.auth0.com/t/webauth-signup-does-not-detect-email-conflicts-when-an-existing-user-was-created-through-a-social-identity-provider/39994/1 "2020-03-26T14:57:51Z")

</div>

Hello,

I’m currently encountering a weird edge case that I’m hoping someone might be able to shed some light on. My current application allows for Social Sign-on with Google & Github, as well as a customized form to sign-up using the auth0js WebAuth configuration. I have existing rules setup that will normalize emails & merge profiles that match email addresses, but I’ve noticed a very unique edge case that I can’t seem to resolve with rules or hooks, and I’m honestly not sure why I’m encountering it.

The bug is as follows:

1. A user signs up using a Social Identity Provider (Google)
2. Once their account is created, a user navigates back to the Sign-up page to create a new user using the form this time. They submit the request using the same email address as the one they user for their Google sign-up, and are returned the new profile rather than user that was merged into the existing one.

I’ve tried creating rules & hooks to resolve this, but each seems limited in their own way. One solution I tried to implement was a pre user registration rule to check to see if the user exists in the database (calling the /api/v2/users-by-email) from a hook, but I don’t have access to the auth0.accessToken here. Would anyone happen to have experienced this / have any thoughts on how to resolve this? I’m not sure why auth0 isn’t automatically detecting email collisions at the outset of the request like it would if a user tried signing up through the form twice in a row

---

<div class="post-metadata">

**Author:** ![asalem](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/asalem/32/20084_2.png) [@asalem](https://community.auth0.com/u/asalem)\
**Post date:** [April 23, 2020, 5:31pm UTC](https://community.auth0.com/t/webauth-signup-does-not-detect-email-conflicts-when-an-existing-user-was-created-through-a-social-identity-provider/39994/2 "2020-04-23T17:31:17Z")

</div>

For anyone experiencing the same issue, my solution was similar to what I had tried, in the description:

- Query the API endpoint to request a valid token
- Query all the users within the database for any matches to the email submitted
- If a matching user was found, throw an error
- Otherwise continue with the registration process

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [April 24, 2020, 7:52am UTC](https://community.auth0.com/t/webauth-signup-does-not-detect-email-conflicts-when-an-existing-user-was-created-through-a-social-identity-provider/39994/3 "2020-04-24T07:52:35Z")

</div>

Glad you have figured it out and thanks for sharing with the rest of community!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 9, 2020, 7:52am UTC](https://community.auth0.com/t/webauth-signup-does-not-detect-email-conflicts-when-an-existing-user-was-created-through-a-social-identity-provider/39994/4 "2020-05-09T07:52:37Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
