WebClientIdInitialized() public static method

public static WebClientIdInitialized ( ) : bool
return bool
Example #1
0
 public void GetServerAuthCode(Action <CommonStatusCodes, string> callback)
 {
     if ((this.mClient != null) && this.mClient.IsAuthenticated())
     {
         if (GameInfo.WebClientIdInitialized())
         {
             this.mClient.GetServerAuthCode("995406906094-gv9jtvln7nl7b44p7od2agqr983j3jdu.apps.googleusercontent.com", callback);
         }
         else
         {
             Logger.e("GetServerAuthCode requires a webClientId.");
             callback(CommonStatusCodes.DeveloperError, string.Empty);
         }
     }
     else
     {
         Logger.e("GetServerAuthCode can only be called after authentication.");
         callback(CommonStatusCodes.SignInRequired, string.Empty);
     }
 }
        /// <summary>
        /// Gets the server auth code.
        /// </summary>
        /// <remarks>This code is used by the server application in order to get
        /// an oauth token.  For how to use this acccess token please see:
        /// https://developers.google.com/drive/v2/web/auth/web-server
        /// </remarks>
        /// <param name="callback">Callback.</param>
        public void GetServerAuthCode(Action <CommonStatusCodes, string> callback)
        {
            if (mClient != null && mClient.IsAuthenticated())
            {
                if (GameInfo.WebClientIdInitialized())
                {
                    mClient.GetServerAuthCode(GameInfo.WebClientId, callback);
                }
                else
                {
                    GooglePlayGames.OurUtils.Logger.e(
                        "GetServerAuthCode requires a webClientId.");
                    callback(CommonStatusCodes.DeveloperError, "");
                }
            }
            else
            {
                GooglePlayGames.OurUtils.Logger.e(
                    "GetServerAuthCode can only be called after authentication.");

                callback(CommonStatusCodes.SignInRequired, "");
            }
        }