# Social Connection Logout (Google and Facebook) federated takes user to strange places

**URL:** <https://community.auth0.com/t/social-connection-logout-google-and-facebook-federated-takes-user-to-strange-places/62598>\
**Category:** Get Help\
**Tags:** google, facebook, social-connections\
**Created:** [May 11, 2021, 3:20pm UTC](https://community.auth0.com/t/social-connection-logout-google-and-facebook-federated-takes-user-to-strange-places/62598 "2021-05-11T15:20:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jesse2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jesse2/32/13539_2.png) [@jesse2](https://community.auth0.com/u/jesse2)\
**Post date:** [May 11, 2021, 3:20pm UTC](https://community.auth0.com/t/social-connection-logout-google-and-facebook-federated-takes-user-to-strange-places/62598/1 "2021-05-11T15:20:37Z")

</div>

I am trying to implement social login using a webview from within a Unity application. I have connected Google and Facebook as social connections.

Login works well, but logout is confusing me because the user ends up at strange places.

It might be relevant that I am using a webview within a cross platform app. So on desktop it will ‘pop out’ as a web view browser, while on iOS it will use a more native browser to iOS.  
The browser package we are using is [uniwebview](https://docs.uniwebview.com/guide/)

What I’m experiencing is I will open a web view to logout (I think I need to do that, because federated logout may direct the user to other places depending on the login used?),  
Then if they were logged in with google, they end up here `https://accounts.google.com/ServiceLogin?elo=1`  
Or if they were logged in with facebook they end up here `https://www.facebook.com/home.php`

Neither case will let the user end up where I expect them to (the &returnTo= param given, which is a return to the uniwebview which I can use to receive an event that the logout is complete).  
I should also mention that if a user is logged in directly with us (a database connection through Auth0), and we ask them to logout, still with the `?federated` query param - it all works and the user ends up at `returnTo` where we close the browser and continue after logout.

Here is an example of the logout url I am opening with the webview:  
https://{Auth0DomainHere}/v2/logout?client\_id=xxxRedactedxxx&federated&returnTo=uniwebview%3A%2F%2Flogout-complete

And here are screenshots showing where the user ends up:  
If logged in with Google, user ends up at `https://accounts.google.com/ServiceLogin?elo=1`

 ![image](https://global.discourse-cdn.com/auth0/original/3X/e/e/eeddffa5f3be3489040d3167afad44fd88b5a407.png)  
If logged in with Facebook, user ends up at `https://www.facebook.com/home.php`  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/4/4/44297afe0a182d8c66a45df06d1f987e610b4f1a.png)

Please help me understand how to troubleshoot further or logout the same way for any logins.  
We are also planning on adding “Sign in with Apple” so it would be good to know if this has any gotchas regarding logout too.  
Thanks so much!

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [September 2, 2021, 10:26pm UTC](https://community.auth0.com/t/social-connection-logout-google-and-facebook-federated-takes-user-to-strange-places/62598/2 "2021-09-02T22:26:48Z")

</div>

This is an old post, but the answer still applies: neither Google nor Facebook support sending a user to a different place after a logout. So, unfortunately, if you choose to do a federated logout you are at the mercy of the social idp in regards to where the user will end up.

In general, logging the user out of their social identities might not be a good idea, as users probably use that session for other purposes as well and would be annoyed to find out that logging out of your app also logs them out of their social identity.

---

<div class="post-metadata">

**Author:** ![kchoy](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kchoy/32/49073_2.png) [@kchoy](https://community.auth0.com/u/kchoy)\
**Post date:** [August 17, 2023, 10:40pm UTC](https://community.auth0.com/t/social-connection-logout-google-and-facebook-federated-takes-user-to-strange-places/62598/3 "2023-08-17T22:40:06Z")

</div>

Is this still relevant today? I also would like to change where Google takes me after a federated logout

---

<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:** [August 18, 2023, 1:56am UTC](https://community.auth0.com/t/social-connection-logout-google-and-facebook-federated-takes-user-to-strange-places/62598/4 "2023-08-18T01:56:36Z")

</div>

Hey there @kchoy welcome to the community!

Unfortunately, it looks like Google still does not support a `returnTo` parameter today.

---

<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:** [September 1, 2023, 1:57am UTC](https://community.auth0.com/t/social-connection-logout-google-and-facebook-federated-takes-user-to-strange-places/62598/5 "2023-09-01T01:57:05Z")

</div>

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