playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.44k stars 959 forks source link

Using ConfigBuilder.RequestServerAuthCode(false) causes issues #3039

Open benjaben opened 3 years ago

benjaben commented 3 years ago
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
                // requests a server auth code be generated so it can be passed to an
                .Build();

            PlayGamesPlatform.InitializeInstance(config);
            // recommended for debugging:
            PlayGamesPlatform.DebugLogEnabled = true;

            // Activate the Google Play Games platform
            PlayGamesPlatform.Activate();

This works and gets me through logging in.

PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
                // requests a server auth code be generated so it can be passed to an
                //  associated back end server application and exchanged for an OAuth token.
                .RequestServerAuthCode(false)
                .Build();

            PlayGamesPlatform.InitializeInstance(config);
            // recommended for debugging:
            PlayGamesPlatform.DebugLogEnabled = true;

            // Activate the Google Play Games platform
            PlayGamesPlatform.Activate();`

This breaks and throws a canceled status.

Those are the main issues I saw that other people had, but I've got them all covered.

pbelluzzo commented 3 years ago

I had the same problem, succeded logging in without .RequestServerAuthCode(false), but now i have problems. With .RequestServerAuthCode(false), i have the same problem, if i set it to true, the oauth consent screen appears, give me a security warning ( sill in internal test), and ask for permissions. After allowing, the consent screen reloads, shows the warning and ask for permissions. And the loop goes on, never succeding or failing....