November 29. Google, Why Does It Always Have to Be Such a Nightmare?

Google has really outdone themselves — every task feels like navigating a maze of unnecessary pain and confusion.
About a year and a half ago, I had already integrated Google Play Games authentication into TrappedTogether. And it was so painful… I was figuring everything out by myself, asked my friend for help, used neural networks… we dug through this mess for about two months and somehow managed to make it work.
The documentation — terrible. Neural networks constantly output code for the old version of Google’s plugin while insisting it’s the new version.
It’s as if 20 developers built one part of the system with their own interfaces, another 20 built a second part with totally different ones, and yet another 20 did something else entirely. And the app developer? Supposed to magically make all three contradictory interfaces cooperate.
And now it looks like it’s time to redo everything again…
What happened
As I wrote earlier, Google noticed that I was sending data to the server and asked me to implement the ability to delete all user data on the server.
First I thought that it's chance to gain some good Node.js experience. But it became clear that things weren’t that simple.
A task I expected to take a couple of evenings turned into some kind of hell — endless attempts to find at least one working solution!
The problem is that in Trapped Together, players sign in through Google Play Games, but on the web server, of course, there is no Google Play Games — just regular Google login.
But Google Play Games is still a Google account. So why not just log in through Google Play Games and get a normal Google user ID?
NO! YOU CAN’T!
How Google ruined all the interfaces in favor of anonymity
What used to work — no longer does. In the old Google Play Games plugin for Unity, you could request whatever permissions you needed — for example, getting the user’s Google ID or email. Now that option simply doesn’t exist.
It looks like Google Play Games intentionally switched to a new API that does not allow identifying the real user in any way. All you get is their gamer profile name and their gaming identifier .And the google developers went even further — they claim that the gaming identifier will be different across different games! So… no real user at all.
Exotic token-based solutions
Neural networks keep suggesting logging in through Google Play Games and sending the AuthToken to the server, where the server could then request the googleId and email.
But no!
Google Play Games does give you a token, and you can authenticate with it on the server…But the token has no scopes other than auth. So you can’t request any data through it — Google responds with “Access denied”.
Why not log into the game using a regular Google account?
The first thought is obvious — why not use a regular Google account login instead? That would even be easier! Not everyone has Google Play Games, but everyone has a Google account
.But no… not that simple. The old GoogleAuth plugin hasn’t been updated 8 years, and it doesn’t compile anymore. And there is no new version. Unity officially admits that Google authentication doesn’t work out of the box.
Alternatives
Yes… I could try using raw OAuth.The problem is that it requires a callback address — a URL where Google returns the authentication result. But a mobile app doesn’t have an address.I could try implementing that callback via DeepLinks.
Well… time to go learn that…