question

eerdemyaman avatar image
eerdemyaman asked

Using Google Sign-in with PlayFab? Codes not working,

I try to use sign in Google with PlayFab. I did everything as written in link below.

https://playfab.com/blog/setting-up-google-sign-in/

But at least step, c# code not working. There is an error at GetServerAuthCode. Says that "No overload for method `GetServerAuthCode' takes `1' arguments"

,
aa.jpg (53.9 KiB)
10 |1200

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

marcowilliamspf avatar image
marcowilliamspf answered

@Alexandre

Ugh, well it appears that they just changed this on April 5th. I would recommend rolling back your GPG to the previous version and wait until I can retest this with the current version.

It appears that they changed GetServerAuthCode() to return a string on April 5th and you now have to put PlayGamesClientConfiguration.Builder.RequestServerAuthCode(false) when creating the configuration. They also removed the callback function, I'm not sure why they would do this vs fixing the important crashing bugs on 10.2.0. /shrugs.

Meanwhile, I don't have a good answer for you and it will take me possibly until next week to look into this.

Again, my advice is to rollback GPG to the previous version before they made this change.
https://github.com/playgameservices/play-games-plugin-for-unity/releases/tag/v0.9.36

10 |1200

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

marcowilliamspf avatar image
marcowilliamspf answered

Hi @eerdemyaman

I'm not sure why you are getting this error. I would really need to get more info on your project setup. E.G. What version of GPG you are using?

We have not yet surfaced this guide. https://api.playfab.com/docs/tutorials/landing-players/sign-in-with-google but there is an example project and you should compare what you have to what we are doing. Because our project is a working example.


10 |1200

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

forplayers.co avatar image
forplayers.co answered

I'm having the same issue using GPG 0.9.37. I also noticed that we can't authenticate with social.localuser.authenticate when we use the OAuth clientId of the cloud console. However, the OAuth clientId from the games services of the developer console works.

2 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.

forplayers.co avatar image forplayers.co commented ·

P.S. I was following this tutorial link

0 Likes 0 ·
forplayers.co avatar image forplayers.co commented ·

In fact in the v 0.9.37, the GetServerAuthCode function hasn't got parameters. I changed the code a bit: "string s = ...GetServerAuthCode()" but it was still not working

0 Likes 0 ·
forplayers.co avatar image
forplayers.co answered

@MarcoWilliamsPF

I rolled back GPG to 0.9.36 with the 10.0.1 aar files. After the second try, it never stopped to crash after Social.localUser.Authenticate. The aar files were still at 10.0.1. Even when I tried to get back to 0.9.37, it never stopped to crash.

When I had GPG 0.9.37 with the 10.2.0 aar files, it never cashed. This thread informs that the aar files bug was fixed in GPG 0.9.37.

Even after having deleted everything concerning GPG, it's no more possible to authenticate via Social.localUser.... Even with the same structure as before.

Another thing concerning this tutorial, which url do we have to set in the launch URL field?

Regards,

Alexandre

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.

forplayers.co avatar image forplayers.co commented ·

I discovered in this thread https://github.com/playgameservices/play-games-plugin-for-unity/issues/1684 that it's maybe due to the update that I did just at this moment. hell

0 Likes 0 ·
marcowilliamspf avatar image
marcowilliamspf answered

I'll have to update the doc's because I forgot to mention a section here

Where you have to enter in the proper endpoints and authorization redirects.

https://oauth.playfab.com/oauth2/google & in the section above it https://[titleId].playfabapi.com

This goes in the google play console, however this will not cause your game to crash, it would just make the PlayFab API call to login not work and return an error.

As for your crash issues, Please refer to the tutorial I created, there is a sample project which I know 100% works. Download that and compare what you are doing with what I am doing in that project.

I've verified that the version of GPG is 0.9.36 and I have this working pefectly with the PlayFab service. I'll be looking into 0.9.37 compatibility next week.


oauth-settings.png (27.9 KiB)
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.