How can I get ID token from OnlineSubsystemGooglePlay?

Hello there,

Actually, I’m a very newbie in UE.
I’m working on an Android project that is using OnlineSubsystemGooglePlay.
So far, I could make my app to log in(sign in) GooglePlay with a ShowExternalLoginUI node successfully.
I guess the OnlineSubsystemGooglePlay is using Google Sign-in service under the hood.

On the other hand, my project has a backend system and the app needs to communicate with the backend.
During this communication, the backend will authorize requests from the app by OAuth manner.
So, the app needs to get an ID token from Google after it logged in, and then send it to my own backend.
Eventually the backend will use the ID token for verification. Here’s a reference: >> click <<

The thing is… I have no idea how can I get the ID token out of the OnlineSubsystemGooglePlay deep inside. :frowning:
When I checked GetOnlineAccountID in UnrealMatch3, it has the following code.

PlayerController->PlayerState->UniqueId->GetHexEncodedString();

Is the “UniqueId” in the code is the exactly same one that I looking for? or something else?
If it is not… is there a way to get the ID token from the OnlineSubsystem nicely?

Thank you for your reading and helping in advance.

From what I can see, there’s no way to get the id token from Google Play without modifying the engine, possibly at the java layer.

The only thing you can get is an access token, but you can’t verify the identity with that. I hear there are some Android improvements coming in 4.17, but I’m not sure if that’s part of it.

It looks like the id token is at least internally accessible with the OnlineSubsystemGoogle, but I’m sure it’ll require some tinkering to get that out too.