# Google Auth allows people to register with Corporate email addresses

**URL:** <https://community.auth0.com/t/google-auth-allows-people-to-register-with-corporate-email-addresses/115514>\
**Category:** Get Help\
**Tags:** email-verification, user-management\
**Created:** [September 6, 2023, 8:11am UTC](https://community.auth0.com/t/google-auth-allows-people-to-register-with-corporate-email-addresses/115514 "2023-09-06T08:11:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dominic.banister](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@dominic.banister](https://community.auth0.com/u/dominic.banister)\
**Post date:** [September 6, 2023, 8:11am UTC](https://community.auth0.com/t/google-auth-allows-people-to-register-with-corporate-email-addresses/115514/1 "2023-09-06T08:11:30Z")

</div>

We support Single Sign On using Google and Microsoft but we’ve seen that a user of Microsoft can register with Google using their Microsoft email address. Google then sends them a validation email and they can then proceed to login using that email address against Google or Microsoft.

The problem then comes if they leave the Microsoft identity for whatever reason, e.g. they were fired, they can just choose to auth against Google at login and still authenticate using the same email.

Is there a way of ensuring the user hasn’t just registered their company email address, which was with MSFT, with Google’s Identity and are signing in with that instead?

Was wondering about only supporting GSuite or Microsoft Work Accounts for SSO?

---

<div class="post-metadata">

**Author:** ![nicholas.browning](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicholas.browning/32/74327_2.png) [@nicholas.browning](https://community.auth0.com/u/nicholas.browning)\
**Post date:** [July 7, 2025, 1:49pm UTC](https://community.auth0.com/t/google-auth-allows-people-to-register-with-corporate-email-addresses/115514/2 "2025-07-07T13:49:53Z")

</div>

Did you ever find a precise solution for this?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [July 7, 2025, 6:21pm UTC](https://community.auth0.com/t/google-auth-allows-people-to-register-with-corporate-email-addresses/115514/3 "2025-07-07T18:21:06Z")

</div>

Hi everyone!

In order to prevent such users logging in through the google social connection, you could check if their domain is gmail or not and prevent authentication by using a Post Login Trigger:

```auto
if(event.transcation.protocol === 'google-oauth2' && username.domain != 'gmail.com")
{
api.access.deny('reason");
}

```

After denying access, you would need to delete the identity created by their login attempt as well.

Kind Regards,  
Nik

---

<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:** [July 21, 2025, 6:21pm UTC](https://community.auth0.com/t/google-auth-allows-people-to-register-with-corporate-email-addresses/115514/4 "2025-07-21T18:21:22Z")

</div>

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