Skip to content

Commit

Permalink
Merge pull request #2769 from playgameservices/aerialninja-patch-1
Browse files Browse the repository at this point in the history
Add logging for authentication attempts.
  • Loading branch information
olehkuznetsov authored Oct 29, 2019
2 parents b7f5eef + c7026a2 commit 4886f01
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ public void Authenticate(Action<bool, string> callback, bool silent)
}

mAuthState = AuthState.Authenticated;
InvokeCallbackOnGameThread(callback, true, "Authentication succeed");
InvokeCallbackOnGameThread(callback, true, "Authentication succeeded");
GooglePlayGames.OurUtils.Logger.d("Authentication succeeded");
try
{
using (var activationHint =
Expand Down Expand Up @@ -220,6 +221,7 @@ public void Authenticate(Action<bool, string> callback, bool silent)
{
SignOut();
InvokeCallbackOnGameThread(callback, false, "Authentication failed");
GooglePlayGames.OurUtils.Logger.d("Authentication failed");
}
}
);
Expand All @@ -233,14 +235,17 @@ public void Authenticate(Action<bool, string> callback, bool silent)
if (result == 16 /* CommonStatusCodes.CANCELED */)
{
InvokeCallbackOnGameThread(callback, false, "Authentication canceled");
GooglePlayGames.OurUtils.Logger.d("Authentication canceled");
}
else if (result == 8 /* CommonStatusCodes.DEVELOPER_ERROR */)
{
InvokeCallbackOnGameThread(callback, false, "Authentication failed - developer error");
GooglePlayGames.OurUtils.Logger.d("Authentication failed - developer error");
}
else
{
InvokeCallbackOnGameThread(callback, false, "Authentication failed");
GooglePlayGames.OurUtils.Logger.d("Authentication failed");
}
}
}
Expand Down Expand Up @@ -1148,4 +1153,4 @@ private AndroidJavaObject getVideosClient()
}
}
}
#endif
#endif

0 comments on commit 4886f01

Please sign in to comment.