Skip to content

Conversation

@Hamdiovish
Copy link

@Hamdiovish Hamdiovish commented Oct 5, 2020

This is actually an updated version of the PR #35.
This PR add support to request email, profile and token id within the signin call.
The token id can be used for server side logics such auth and getting user details.
So the result of "_on_sign_in_success()" callback will be in the fallowing format: {"displayName":"lorem","email":"[email protected]","id":"0123456789","token":"lorem_epsum"}

Note: the requestToken must be created first in the google cloud console as a "OAuth 2.0 Client IDs" of a web application:
https://console.cloud.google.com/apis/credentials

Note: this PR isn't a duplication of the "Player Info" section, since the "token id" can be retrieved only at the sign in level.

Regards

@oneseedfruit
Copy link

Thanks for the pull request! (I'm not the owner of this repo, just someone grateful for your work)

I have the OAuth Client ID of type "Web application" already created and I've tried using it but having a non-empty requestToken like so:

play_games_services.init(true, false, false, "<my web application client id>")

would result in a perpetually loading pop-up that appears after tapping on an account to sign-in:

20210201_193002

It never managed to get sign in to Google Play Games Services though.

However if I were to leave requestToken empty:

play_games_services.init(true, false, false, "")

it always signs in successfully.

Strangely, before trying out your pull request, if I were to use initWithSavedGames instead of init, the same thing always happened with that perpetual loading.

It might be something I miss when it comes to configuring Google Play Console, but I can't figure it out.

@oneseedfruit
Copy link

I found that this may be the cause?: #58

@oneseedfruit
Copy link

oneseedfruit commented Feb 3, 2021

Found the fix: #58 (comment)

Caused by deprecated API. :'( This solved the problem of not able to use init with Savved Games.

However using this pull request to get token doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants