# iOS Google Sign-In native integration?

**URL:** <https://community.auth0.com/t/ios-google-sign-in-native-integration/79021>\
**Category:** Get Help\
**Tags:** google, ios\
**Created:** [February 28, 2022, 3:45pm UTC](https://community.auth0.com/t/ios-google-sign-in-native-integration/79021 "2022-02-28T15:45:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcdave](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mcdave/32/35368_2.png) [@mcdave](https://community.auth0.com/u/mcdave)\
**Post date:** [February 28, 2022, 3:45pm UTC](https://community.auth0.com/t/ios-google-sign-in-native-integration/79021/1 "2022-02-28T15:45:18Z")

</div>

- **Which SDK this is regarding:** Auth0.swift
- **SDK Version:** [1.38.1](https://github.com/auth0/Auth0.swift/releases/tag/1.38.1)
- **Platform Version:** Swift 5 (SwiftUI)

Is there a way to implement Google Sign-In natively within the iOS app? Just like how apple sign in is implemented and [authenticate with Auth0](https://auth0.com/docs/quickstart/native/ios-swift-siwa).

Thank you so much!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [February 28, 2022, 8:44pm UTC](https://community.auth0.com/t/ios-google-sign-in-native-integration/79021/3 "2022-02-28T20:44:44Z")

</div>

Hey there @mcdave , welcome to the community!

Google [prohibits the use of embedded browsers](https://developers.googleblog.com/2021/06/upcoming-security-changes-to-googles-oauth-2.0-authorization-endpoint.html) in the context of OAuth so this is unfortunately not possible. This is also mentioned in our docs in the article below regarding Universal vs. Embedded Login.

> **[Centralized Universal Login vs. Embedded Login](https://auth0.com/docs/authenticate/login/universal-vs-embedded-login#security-risks)**
>
> Describes the differences between centralized Universal Login and Embedded login.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![mcdave](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mcdave/32/35368_2.png) [@mcdave](https://community.auth0.com/u/mcdave)\
**Post date:** [March 1, 2022, 1:41pm UTC](https://community.auth0.com/t/ios-google-sign-in-native-integration/79021/4 "2022-03-01T13:41:48Z")

</div>

Hi @ty.frith, Thank you for the response 👍

Curious, because I am thinking of using token exchange natively with auth0 and not via embedded flow. Or are they the same?

Sharing reference flow I follow for [Sign In with Apple Token Exchange](https://auth0.com/docs/quickstart/native/ios-swift-siwa#auth0-token-exchange) in comparison to what I am expecting to do with [Sign In with Google ID Token](https://developers.google.com/identity/sign-in/ios/backend-auth#send-the-id-token-to-your-server). So for google I am thinking if there is available documentation for google sign in to do token exchange with auth0 using `idToken` upon successful google sign in authentication.

Thank you so much!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 1, 2022, 7:51pm UTC](https://community.auth0.com/t/ios-google-sign-in-native-integration/79021/5 "2022-03-01T19:51:29Z")

</div>

No problem, happy to help!

Thanks for clarifying - Those are indeed different flows. We unfortunately do not support native social login for Google as as far as I’m aware and hence have no documentation for it. FWIW, the request is made to [/oauth/token](https://auth0.com/docs/api/authentication#token-exchange-for-native-social) with the grant type `urn:ietf:params:oauth:grant-type:token-exchange`. I’m not sure what would happen if you attempted to hit that with an ID Token from Google.

---

<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:** [March 16, 2022, 7:52pm UTC](https://community.auth0.com/t/ios-google-sign-in-native-integration/79021/6 "2022-03-16T19:52:19Z")

</div>

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