Remove Steam auth

This commit is contained in:
Natsumi
2022-07-29 06:54:08 +12:00
parent 9aef61b9df
commit b0109e60d3
6 changed files with 4 additions and 106 deletions
-8
View File
@@ -86,14 +86,6 @@ namespace VRCX
Cef.GetGlobalCookieManager().DeleteCookies(); Cef.GetGlobalCookieManager().DeleteCookies();
} }
public string LoginWithSteam()
{
var rpc = VRChatRPC.Instance;
return rpc.Update() == true
? rpc.GetAuthSessionTicket()
: string.Empty;
}
public bool[] CheckGameRunning() public bool[] CheckGameRunning()
{ {
var isGameRunning = false; var isGameRunning = false;
+2 -3
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
@@ -212,7 +212,6 @@
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>xcopy /y "$(ProjectDir)VRChatRPC\VRChatRPC.dll" . <PostBuildEvent>xcopy /y "$(ProjectDir)OpenVR\win64\openvr_api.dll"</PostBuildEvent>
xcopy /y "$(ProjectDir)OpenVR\win64\openvr_api.dll"</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
-63
View File
@@ -1,63 +0,0 @@
// Copyright(c) 2019-2022 pypy, Natsumi and individual contributors.
// All rights reserved.
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace VRCX
{
public class VRChatRPC
{
public static readonly VRChatRPC Instance;
[DllImport("VRChatRPC", CallingConvention = CallingConvention.Cdecl)]
private static extern bool VRChatRPC_000();
[DllImport("VRChatRPC", CallingConvention = CallingConvention.Cdecl)]
private static extern int VRChatRPC_001([Out] byte[] data, int size);
[DllImport("VRChatRPC", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr VRChatRPC_002();
static VRChatRPC()
{
Instance = new VRChatRPC();
}
public bool Update()
{
return VRChatRPC_000();
}
public string GetAuthSessionTicket()
{
var a = new byte[1024];
var n = VRChatRPC_001(a, 1024);
return BitConverter.ToString(a, 0, n).Replace("-", string.Empty);
}
public string GetPersonaName()
{
var ptr = VRChatRPC_002();
if (ptr != IntPtr.Zero)
{
int n = 0;
while (Marshal.ReadByte(ptr, n) != 0)
{
++n;
}
if (n > 0)
{
var a = new byte[n];
Marshal.Copy(ptr, a, 0, a.Length);
return Encoding.UTF8.GetString(a);
}
}
return string.Empty;
}
}
}
-3
View File
@@ -1,3 +0,0 @@
it grabs some data from VRChat process.. use at own risk.
by pypy (mina#5656)
Binary file not shown.
-27
View File
@@ -1181,33 +1181,6 @@ speechSynthesis.getVoices();
}); });
}; };
/*
params: {
steamTicket: string
}
*/
API.loginWithSteam = function (params) {
return this.call(
`auth/steam?apiKey=${this.cachedConfig.clientApiKey}`,
{
method: 'POST',
params
}
).then((json) => {
var args = {
json,
params,
origin: true
};
if (json.requiresTwoFactorAuth) {
this.$emit('USER:2FA', args);
} else {
this.$emit('USER:CURRENT', args);
}
return args;
});
};
/* /*
params: { params: {
code: string code: string