Exemplo n.º 1
0
        public override void RemoteError(string error)
        {
            base.RemoteError(error);

            if (id != null)
            {
                VRCModNetworkManager.SheduleForMainThread(() =>
                {
                    SecurePlayerPrefs.DeleteKey("vrcmnw_token_" + id);
                });
            }
        }
Exemplo n.º 2
0
 public override void Handle(string parts)
 {
     Destroy();
     if (parts.StartsWith("OK"))
     {
         VRCModNetworkManager.SheduleForMainThread(() =>
         {
             onSuccess?.Invoke();
         });
     }
     else
     {
         onError(parts);
     }
 }
Exemplo n.º 3
0
 public override void Handle(string parts)
 {
     if (parts.StartsWith("OK"))
     {
         VRCModNetworkManager.SheduleForMainThread(() =>
         {
             VRCModNetworkManager.IsAuthenticated = true;
             if (!parts.Equals("OK"))
             {
                 string token = parts.Substring(3);
                 SecurePlayerPrefs.SetString("vrcmnw_token_" + id, token, "vl9u1grTnvXA");
             }
         });
     }
     Destroy();
 }
Exemplo n.º 4
0
        public override void RemoteError(string error)
        {
            base.RemoteError(error);

            if (id != null)
            {
                VRCModNetworkManager.SheduleForMainThread(() =>
                {
                    if (SecurePlayerPrefs.HasKey("vrcmnw_token_" + id))
                    {
                        SecurePlayerPrefs.DeleteKey("vrcmnw_token_" + id);
                        VRCModNetworkManager.userUuid = "";
                    }
                });
            }
            VRCModNetworkManager.authError = error;
        }
Exemplo n.º 5
0
        public override void Handle(string parts)
        {
            Destroy();
            if (parts.StartsWith("OK"))
            {
                VRCModNetworkManager.SheduleForMainThread(() =>
                {
                    int returnValue = int.Parse(parts.Split(new[] { ' ' }, 2)[1]);
                    VRCModNetworkManager.IsAuthenticated = true;

                    VRCModNetworkManager.VRCAuthStatus = returnValue;
                    onSuccess?.Invoke();
                });
            }
            else
            {
                onError(parts);
            }
        }