Quickstart-unity: Google Play Games Authentication Support

Created on 5 Mar 2017  ·  6Comments  ·  Source: firebase/quickstart-unity

I am trying to figure out how to get googleIdToken and googleAccessToken so I can authorize a user with google sign in. Can anyone help me please? I also use Google Play Game services but the I cannot get the id token.

feature request

All 6 comments

Sorry for the delay.

This has been a sore spot. The API was removed to get idtoken and authcode in the 10.2 plugins and on the backend. So there's really 2 problems. In 10.2 these calls will throw exceptions, because the underlying API was removed but it's still in the wrapper. And even if you rolled back the plugin to < 10.2 (see issue #70) you'll still not get anything back from the backend because of changes that happened when G+ was removed from google play services; it had a wonky way of getting at the idtoken and authcode that depended on G+.

Adding support for google play games authentication is definitely on our roadmap, so eventually you won't have to hack up your own solution. And right now, it looks like you're kind of stuck.

I'll keep this issue open and update you when we have more info.

Any idea when this will be supported? Without this feature I cannot even use the plugin as it does not seems to play nice google play sign in so far, too bad, looks cool.

[Update] After updating to the latest Google Play Services I can sign in again with that, is there a way to retrieve googleIdToken and googleAccessToken once signed in with Play? Maybe a potential work around there?

[Update] It turns out the latest google play plugin for Unity does not support iOS so I had to downgrade and remove Firebase.

@SrirachaSource when you say "Google Play Plugin" do you mean "Google Play Games Plugin" not supporting iOS? I'm wondering why this make any difference to your use of the Firebase Unity plugin? Both components are pretty independent.

You also mention it not playing nice with Google Play (Games?) Sign-in. Is this a requirement for your game? If so, we are working on it, no ETA yet.

Yes Google play games plugin, or gpgs. So perhaps I'm wrong that firebase
supports Unity on iOS platform? But basically the issue is that I need
google/Facebook/Twitter sign in on Android and iOS. Gpgs supports this for
google sign in only (acceptable for now) on what is now an older rev of the
gpgs plugin. I was hoping I could use gpgs to sign in and then use firebase
for everything else, but my version of gpgs started getting build errors
after adding firebase. So I updated to latest rev of gpgs and that fixed
the build errors but gpgs iOS support was completely removed so... poop. So
I had to back out of firebase and no now I'm searching for a solution going
forward and I was hopping firebase would fix it's unity support (and I hope
it works on iOS too).

On Fri, Jun 9, 2017, 2:26 PM Stewart Miles notifications@github.com wrote:

@SrirachaSource https://github.com/srirachasource when you say "Google
Play Plugin" do you mean "Google Play Games Plugin" not supporting iOS? I'm
wondering why this make any difference to your use of the Firebase Unity
plugin? Both components are pretty independent.

You also mention it not playing nice with Google Play (Games?) Sign-in. Is
this a requirement for your game? If so, we are working on it, no ETA yet.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/firebase/quickstart-unity/issues/64#issuecomment-307503924,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AE6Ydpfd4RElbpJvmbSzyrU9TqUg1eG0ks5sCbifgaJpZM4MThZ9
.

@claywilkinson FYI

What were the build errors? Any chance you could share the logs?

It's possible that it's just the Play Services Resolver (Jar Resolver) that's causing problems. If so, it's pretty easy to fix by upgrading to the latest revision here https://github.com/googlesamples/unity-jar-resolver

Cheers,
Stewart

Play Games authentication support was released in version 4.5.0 https://firebase.google.com/support/release-notes/unity#4.5.0

Was this page helpful?
0 / 5 - 0 ratings