question

contact@bebopbee.com avatar image
contact@bebopbee.com asked

Google Login: support for new Play Games Permissions (no Google+ required)

Google is changing the way client tokens are used on the server side: 

http://android-developers.blogspot.com.ar/2016/01/play-games-permissions-are-changing-in.html

How will this affect the LinkGoogleAccount method, given that it uses the AccessToken parameter?

Currently I'm using the Google+ Token, but Google is switching to not using Google+ to login anymore, unless Google+ API is needed. This makes the client not to receive a Token to pass to Playfab.

For this case they suggest to use:  "the new GetServerAuthCode flow"

Are there any plans to support this?

Thanks!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

As you've no doubt already seen, we now support the ServerAuthCode path for Google Play sign-in, so you should now be able to use the latest GPG SDK with PlayFab's Google login. Let us know if you run into any issues.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Yes, we have an open task to update for their new auth system. Note that since we cannot break older titles, the existing API method will continue to work (at least, until Google turns off the current AccessToken system), so this will likely be done via a new API method. We'll update here as soon as this has been implemented.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

contact@bebopbee.com avatar image
contact@bebopbee.com answered

Thanks!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hamza Lazaar avatar image
Hamza Lazaar answered

PlayFab does not even need Google Play Games permissions as it does not use the respective API.

Currently, PlayFab's LoginWithGoogleAccount only accepts tokens obtained, in Android, using GoogleAuthUtils.getToken() with zero or more scopes (permissions).

The new Google SignIn API which aims to be simpler and ditches Google+ is relatively new.

Here are 2 links regarding this:

http://android-developers.blogspot.com.ar/2015/11/improvements-to-sign-in-with-google.html

http://android-developers.blogspot.com.ar/2015/12/api-updates-for-sign-in-with-google.html

 

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

contact@dojo-arcade.com avatar image
contact@dojo-arcade.com answered

Thanks for the information Brendan.  Do you know roughly how long until this would ready?  More likely to be weeks or months?  Thanks

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Not yet - we have someone reviewing and scoping the work required, so that we can figure out where it goes in the schedule. It is something we'll be taking care of in the next few sprints, but I can't say specifically when just yet. Since Google isn't likely to cut off the existing method, you should be able to continue to use it for the present, though.

3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dustin avatar image Dustin commented ·

Hi, when is this going to be completed? Using the access token doesn't work, calling

PlayGamesPlatform.Instance.GetAccessToken() always brings up a pop up asking what email you want to send to the game. Why it does that I have no idea, but I don't want the game asking for the user's email address.

Your backend needs to support auth codes returned from PlayGamesPlatform.Instance.GetServerAuthCode. I am now forced to use the login with device id, which defeats the purpose of a cloud save as the user's data won't migrate to a new device.

Thanks.

0 Likes 0 ·
Dustin avatar image Dustin Dustin commented ·

Actually I can't even use the deviceID, requesting that in Unity adds

android.permission.READ_PHONE_STATE to the manifest, which then asks the user if they want to allow my game to manage phone calls in Android 6, obviously not good.

0 Likes 0 ·
Hamza Lazaar avatar image Hamza Lazaar Dustin commented ·

To get Android DeviceID use the method shown here.

To get rid of that permission in Unity just remove any reference to SystemInfo.deviceUniqueIdentifier.

0 Likes 0 ·
brendan avatar image
brendan answered

@Dustin: We have many titles currently using both Device ID and Google account sign-in, so the key here will be to determine why it's not working for you, specifically. What SDK version are you using? What response do you get from GoogleAuthUtil when querying for the token (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil)?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hamza Lazaar avatar image
Hamza Lazaar answered

ICYM: Google Sign-In API migration guide from deprecated v1 to v2.

Anyone who wants (lightweight, -no manifest change required-) Unity Android plugin for Google sign in wrappers just ping me.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

psanchez avatar image psanchez commented ·

Hi Hamza. Do you have that plugin available somewhere? I would like to add it to a project, or at least, to take a look at it.
Thank you.

0 Likes 0 ·
Hamza Lazaar avatar image
Hamza Lazaar answered

Hi @psachez

here you go

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

philipp-bender avatar image
philipp-bender answered

Hi!

Are there any updates regarding the new Google SignIn API?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.