Google Play Game Services - Unnecessary Scopes

Hi,

I have another request that is making my game to be flagged by Google Play reviewers.

I’ve been told my game is asking for the Google+ scope unnecessarily. After looking at the Android docs, the solution for this issue is: “Don’t request any additional scopes unless you absolutely need them

In the Android docs page the solution goes as shown below.


Early versions of our samples and documentation created a GoogleApiClient as follows:

// Don’t do it this way!
GoogleApiClient gac = new GoogleApiClient.Builder(this, this, this)
.addApi(Games.API)
.addScope(Plus.SCOPE_PLUS_LOGIN) // The bad part
.build();
// Don’t do it this way!

In this case, the developer is specifically requesting the plus.login scope. If you ask for plus.login, your users will get a consent dialog.

 

Solution: Ask only for the scopes you need

Remove any unneeded scopes from your GoogleApiClient construction along with any APIs you no longer use.

// This way you won’t get a consent screen
GoogleApiClient gac = new GoogleApiClient.Builder(this, this, this)
.addApi(Games.API)
.build();
// This way you won’t get a consent screen 


I tried to find a way to stop adding the SCOPE_PLUS_LOGIN through Corona but I couldn’t find any parameter or method in the GPGS plugin for that. Has anyone ever experienced the same problem?

Thanks in advance!

Br,

Cleverson

I’m asking our engineers to look into this.

Rob

Hi Rob,

Any updates?

Sorry for pushing you about that. This is my last pending issue before re-submitting for review, so, I’m depending on Corona now.

I believe an engineer has been looking into this, however I don’t see the update on the server yet. I probably can’t find out an update until at least Wednesday.

Rob

Hi Rob,

I need to ask you again, sorry. Any news?

I would love to solve this by myself, but I really can’t.

Cleverson

I’ve asked.

I’ll be able to get an update on this next week.

Rob

Hi Rob,

My game submission is about to expire and I can’t fix this. Do you have any (good) news?

Br,
Cleverson

I’m trying to get a status update. I believe an engineer was working on it yesterday, but I don’t know if it’s completed or not.

Rob

It seems like the cause of the issue is not in GPGS plugin sources. Can I ask you to share with us plugin list from your build.settings, may be one of the plugins you are using has deprecated methods linked to Plus.SCOPE_PLUS_LOGIN api.

Kirill

Hi Kirill,

Sure, here it is:

plugins = { ["plugin.photon"] = { publisherId = "com.exitgames", supportedPlatforms = { iphone=true, android=true, ["android-kindle"]=true } }, ["plugin.openssl"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true, ["android-kindle"]=true } }, ["plugin.firebaseAnalytics"] = { publisherId = "tech.scotth", supportedPlatforms = { iphone=true, android=true, ["android-kindle"]=true } }, ["plugin.firebaseConfig"] = { publisherId = "tech.scotth", supportedPlatforms = { android=true, ["android-kindle"]=true } }, ["plugin.gpgs"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["CoronaProvider.gameNetwork.apple"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true} }, ["plugin.amazon.iap"] = { publisherId = "com.coronalabs", supportedPlatforms = { ["android-kindle"]=true } }, ["plugin.gamecircle"] = { publisherId = "COM\_INNOVATIVELEISURE", supportedPlatforms = { ["android-kindle"] = true }, }, ["plugin.notifications"] = { publisherId = "com.coronalabs" }, },

Br,

Cleverson

Have you tried commenting out the two firebase plugins?

Rob

Hi Rob,

Thanks for the suggestion. I removed both Firebase plugins but got the same result.

One detail that might help. The consent screen is shown twice in the first time the game runs. First it asks for the player’s Google Play Games profile. After granting this permission, a few moments later, a second consent screen is shown asking for the player’s Google Plus profile.

A few more attempts:

  • Removed all ads plugins: same result

  • Removed Photon plugin: same result

  • Removed gpgs plugin: both consent screens are gone

So, it seems it’s really in the GPGS plugin. But if you are not adding the Google Plus Scope in code, then is there any other way I can be doing that?

Maybe look through your Google Play Games console and go to the Google API’s and make sure you don’t have Google+ turned on somewhere.

Rob

Did it. Google+ API was indeed enabled in my account, but I think it shouldn’t be the cause for the consent screen if I’m not requesting, somehow, to use it. Nevertheless, I disable it and the result is the same. I will repeat the test in the next hour just to make sure there isn’t some cache issue.

Retested after 2 hours and I got the same results.

Rob, Kirill

Do you have any other suggestion?

Never used the gpgs plugin but I would remove the hogs plugin for now until fixed I guess

Hopefully there is the way to fix the issue by using Auth.GoogleSignInApi but it will take a while for implement and test. I’ve already started working on it and will inform you here about the process.

Kirill