playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.46k stars 964 forks source link

Sign in with Google consent loop #3069

Closed vyacheslav-sozap closed 2 years ago

vyacheslav-sozap commented 3 years ago

Getting into consent requesting loop while authenticating GPG. Probably connected to server auth code requesting.

Initialization:

PlayGamesPlatform.InitializeInstance(new PlayGamesClientConfiguration.Builder()
    .RequestServerAuthCode(true)
    .Build());
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate();

Authentication:

Social.localUser.Authenticate(result => {
    Debug.Log(result);
});

After trying to authenticate, you see native dialog "Sign in with Google", after pressing "Allow" you see native spinner, animation "Connecting to Play Games" and that dialog again.

In logcat I can see one suspicious message:

E/Auth: [GoogleAccountDataServiceImpl] getToken() -> NEED_REMOTE_CONSENT. App: [app id], Service: oauth2:server:client_id:[client id]:api_scope:https://www.googleapis.com/auth/games_lite

This problem has a workaround - you can close your app, open "Google Play Games" app, open "Profile" -> "⋮" -> "Settings" -> "Delete Play Games account & data" -> "Delete" (at your app record) and after that try to authenticate in your app, everything will be fine.

App is not released to production in Google Play Store, downloaded and installed as apk. Play Games app is in Draft status, user is set as tester in GPG app.

OS: Android 11 Google Play Games app version: 2021.07.28550 GPG Unity plugin version: 0.10.12

M1raclee commented 3 years ago

Did you create consent screen in Google Cloud Platform?

Screenshot 2021-09-06 at 11 15 00
vyacheslav-sozap commented 3 years ago

Sure, it's created and has publishing status "In production"

RocksteadyDog commented 3 years ago

Sure, it's created and has publishing status "In production"

Screenshot_9 Screenshot_10

  1. App logo is empty?
  2. if empty, "Verification not required", otherwise "Needs verification"

My problem was this

ozdemir08 commented 2 years ago

This might be a fixed issue. Feel free to reopen this with a bug report if the issue persists.