# Google-oauth2 social connection strips out login\_hint

**URL:** <https://community.auth0.com/t/google-oauth2-social-connection-strips-out-login-hint/136249>\
**Category:** Get Help\
**Tags:** google-social-connection, connections\
**Created:** [June 12, 2024, 9:18pm UTC](https://community.auth0.com/t/google-oauth2-social-connection-strips-out-login-hint/136249 "2024-06-12T21:18:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alessandro](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alessandro/32/50443_2.png) [@alessandro](https://community.auth0.com/u/alessandro)\
**Post date:** [June 12, 2024, 9:18pm UTC](https://community.auth0.com/t/google-oauth2-social-connection-strips-out-login-hint/136249/1 "2024-06-12T21:18:24Z")

</div>

We are implementing Google One tap login in our application. If the user is logged in multiple accounts with Google, we want to avoid presenting the account selection twice. This can be accomplished when using the `login_hint` parameter and it works perfectly for “@gmail.com” emails; when the email is not a Gmail one, Auth0 removes the `login_hint` parameter when it redirects to Google, causing the account selection screen to be presented.

```auto
# When using a @gmail.com account, login_hint is present on the redirection
$ curl -v "https://mydomain.us.auth0.com/authorize?client_id=myclient-id&scope=openid%20profile%20email&response_type=code&redirect_uri=https%3A%2F%2Fmyapp.com%2Fcallback&connection=google-oauth2&login_hint=john.doe%40gmail.com" 2>&1 | grep -e $'< HTTP\nlocation' -
< HTTP/2 302 
< location: https://accounts.google.com/o/oauth2/auth?login_hint=john.doe%40gmail.com&response_type=code&redirect_uri=https%3A%2F%2Fmydomain.us.auth0.com%2Flogin%2Fcallback&scope=email%20profile&state=auth-state&client_id=my-google-client-id
  
# Otherwise, it gets removed from the redirection URL
$ curl -v "https://mydomain.us.auth0.com/authorize?client_id=myclient-id&scope=openid%20profile%20email&response_type=code&redirect_uri=https%3A%2F%2Fmyapp.com%2Fcallback&connection=google-oauth2&login_hint=john.doe%40company.com" 2>&1 | grep -e $'< HTTP\nlocation' -
< HTTP/2 302 
< location: https://accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri=https%3A%2F%2Fmydomain.us.auth0.com%2Flogin%2Fcallback&scope=email%20profile&state=auth-state&client_id=my-google-client-id

```

---

<div class="post-metadata">

**Author:** ![rockchild](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rockchild/32/15476_2.png) [@rockchild](https://community.auth0.com/u/rockchild)\
**Post date:** [September 25, 2024, 11:14am UTC](https://community.auth0.com/t/google-oauth2-social-connection-strips-out-login-hint/136249/2 "2024-09-25T11:14:13Z")

</div>

We have the same problem.

---

<div class="post-metadata">

**Author:** ![ale.vesga1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ale.vesga1/32/60921_2.png) [@ale.vesga1](https://community.auth0.com/u/ale.vesga1)\
**Post date:** [September 27, 2024, 8:42pm UTC](https://community.auth0.com/t/google-oauth2-social-connection-strips-out-login-hint/136249/4 "2024-09-27T20:42:44Z")

</div>

Hi @rockchild,

I understand you are having issues with Google social connection not keeping the login\_hint. I’ve reached out to the engineering team. It seems there’s no real way to go around this problem using the social connection.

This behavior is by design in response to a vulnerability identified by our security team. Allowing any domain to be forwarded to the Google AuthZ server leaves the user open to account takeover, if a malicious actor has a registered Google Workspace SSO domain with Third-Party IdP enabled.

For this reason using a “ **@company.com** ” domain requires use of the Google Enterprise connection, not the social connection. We limit the login\_hint for the social connection to the **`gmail`** domain.

Please let me know if you have any further questions.

Thank you.

---

<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:** [October 11, 2024, 8:43pm UTC](https://community.auth0.com/t/google-oauth2-social-connection-strips-out-login-hint/136249/5 "2024-10-11T20:43:04Z")

</div>

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