# Google Social Login Not working correctly

**URL:** <https://community.auth0.com/t/google-social-login-not-working-correctly/130888>\
**Category:** Get Help\
**Tags:** google-social-connection, connections\
**Created:** [April 1, 2024, 2:32pm UTC](https://community.auth0.com/t/google-social-login-not-working-correctly/130888 "2024-04-01T14:32:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghassen.melliti](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ghassen.melliti/32/55993_2.png) [@ghassen.melliti](https://community.auth0.com/u/ghassen.melliti)\
**Post date:** [April 1, 2024, 2:32pm UTC](https://community.auth0.com/t/google-social-login-not-working-correctly/130888/1 "2024-04-01T14:32:23Z")

</div>

I added Google Social Login to my app and did all the configuration on auth0 and google console, creating the application and added the client secret to my auth0 configuration.  
i’m also using a custom login page  
when i log in with google, even though my account exists with the mail it creates a new account in auth0 instead of logging with my already existing account.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [April 1, 2024, 11:22pm UTC](https://community.auth0.com/t/google-social-login-not-working-correctly/130888/3 "2024-04-01T23:22:17Z")

</div>

Hi @ghassen.melliti,

Welcome to the Auth0 Community!

> [@ghassen.melliti](#):
>
> when i log in with google, even though my account exists with the mail it creates a new account in auth0 instead of logging with my already existing account.

Can you clarify if the social user exists in Auth0 prior to logging in?

Let me add that it should not be possible to create duplicate social connection users.

Generally, if this is your first time logging in with the Google social connection, it will create a Google social connection user in Auth0.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![ghassen.melliti](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ghassen.melliti/32/55993_2.png) [@ghassen.melliti](https://community.auth0.com/u/ghassen.melliti)\
**Post date:** [April 2, 2024, 1:36pm UTC](https://community.auth0.com/t/google-social-login-not-working-correctly/130888/4 "2024-04-02T13:36:46Z")

</div>

yes the user existed prior to login with google, and when i logged in with google it created a new account with the same email.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [April 4, 2024, 2:16am UTC](https://community.auth0.com/t/google-social-login-not-working-correctly/130888/5 "2024-04-04T02:16:01Z")

</div>

Hi @ghassen.melliti,

Can you confirm whether it will continuously create new users if you repeat this process?

In general, this should not happen.

I suspect you may have a username + password user and a Google social user with the same email address. Can you confirm if the `connection` of both users is the same or different?

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![ghassen.melliti](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ghassen.melliti/32/55993_2.png) [@ghassen.melliti](https://community.auth0.com/u/ghassen.melliti)\
**Post date:** [April 9, 2024, 1:36pm UTC](https://community.auth0.com/t/google-social-login-not-working-correctly/130888/6 "2024-04-09T13:36:43Z")

</div>

it won’t, it just create a new user once then connects to that user when you use google login, and not the same connection as the already existing account.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [April 9, 2024, 9:26pm UTC](https://community.auth0.com/t/google-social-login-not-working-correctly/130888/7 "2024-04-09T21:26:54Z")

</div>

Hi @ghassen.melliti,

Thanks for the information.

Could you please send me a direct message of a user’s email address that was created twice?

This way, I can view their user profiles and associate them with logs to see what might be happening.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![ghassen.melliti](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ghassen.melliti/32/55993_2.png) [@ghassen.melliti](https://community.auth0.com/u/ghassen.melliti)\
**Post date:** [April 12, 2024, 11:38am UTC](https://community.auth0.com/t/google-social-login-not-working-correctly/130888/8 "2024-04-12T11:38:17Z")

</div>

hello,  
i’ve sent you a direct message as requested.

---

<div class="post-metadata">

**Author:** ![ghassen.melliti](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ghassen.melliti/32/55993_2.png) [@ghassen.melliti](https://community.auth0.com/u/ghassen.melliti)\
**Post date:** [May 10, 2024, 9:31am UTC](https://community.auth0.com/t/google-social-login-not-working-correctly/130888/9 "2024-05-10T09:31:28Z")

</div>

Hello Rueben,

i’ve sent you the requested information and still waiting for your response,

we are still having the same issue and its critical for us to get it fixed.

Thank you,

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [May 10, 2024, 4:15pm UTC](https://community.auth0.com/t/google-social-login-not-working-correctly/130888/10 "2024-05-10T16:15:27Z")

</div>

Hi @ghassen.melliti,

My apologies for the late reply.

I’ve gotten a chance to inspect the user in question that you shared with me through direct messages, and I see that the user has 2 separate profiles, specifically one for **google-oauth2** connection and one for **Username-Password-Authentication** in your dev tenant.

There is uniquely one of each type of connection user, meaning I do not see any indication of a duped profile.

This is consistent with my previous message justifying that you have an email + password user and a Google social user with the same email address.

So, in this situation, you can log in with either your email + password or Google social account. Both are separate user profiles associated with different connections.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![ghassen.melliti](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ghassen.melliti/32/55993_2.png) [@ghassen.melliti](https://community.auth0.com/u/ghassen.melliti)\
**Post date:** [May 13, 2024, 10:49am UTC](https://community.auth0.com/t/google-social-login-not-working-correctly/130888/11 "2024-05-13T10:49:27Z")

</div>

Hello rueben,

i don’t fully understand, its normal for me when i had a user with my email then made a google login with the same email for it to create a new user in the tenant?  
then also when i try to google login it doesn’t use the information of my account which causes issues.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [May 14, 2024, 11:15pm UTC](https://community.auth0.com/t/google-social-login-not-working-correctly/130888/12 "2024-05-14T23:15:19Z")

</div>

Hi @ghassen.melliti,

Yes, that’s correct. If you previously created your profile using email + password and then tried to log in with Google, it will create a new user for the Google user.

That’s also correct. The information associated with your Google social user is kept separate from your original user profile in the database connection.

Thanks,  
Rueben

---

<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 28, 2024, 11:16pm UTC](https://community.auth0.com/t/google-social-login-not-working-correctly/130888/13 "2024-05-28T23:16:20Z")

</div>

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