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

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

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


If logged in with Facebook, user ends up at https://www.facebook.com/home.php

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!

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.

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

Hey there @kchoy welcome to the community!

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

2 Likes

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