mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-12 19:33:50 +02:00
Remove Steam auth
This commit is contained in:
12
AppApi.cs
12
AppApi.cs
@@ -86,14 +86,6 @@ namespace VRCX
|
||||
Cef.GetGlobalCookieManager().DeleteCookies();
|
||||
}
|
||||
|
||||
public string LoginWithSteam()
|
||||
{
|
||||
var rpc = VRChatRPC.Instance;
|
||||
return rpc.Update() == true
|
||||
? rpc.GetAuthSessionTicket()
|
||||
: string.Empty;
|
||||
}
|
||||
|
||||
public bool[] CheckGameRunning()
|
||||
{
|
||||
var isGameRunning = false;
|
||||
@@ -200,8 +192,8 @@ namespace VRCX
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
WorkingDirectory = Path.GetDirectoryName(path),
|
||||
FileName = path,
|
||||
UseShellExecute = false,
|
||||
FileName = path,
|
||||
UseShellExecute = false,
|
||||
Arguments = arguments
|
||||
}).Close();
|
||||
}
|
||||
|
||||
@@ -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">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
@@ -212,7 +212,6 @@
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>xcopy /y "$(ProjectDir)VRChatRPC\VRChatRPC.dll" .
|
||||
xcopy /y "$(ProjectDir)OpenVR\win64\openvr_api.dll"</PostBuildEvent>
|
||||
<PostBuildEvent>xcopy /y "$(ProjectDir)OpenVR\win64\openvr_api.dll"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
63
VRChatRPC.cs
63
VRChatRPC.cs
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
it grabs some data from VRChat process.. use at own risk.
|
||||
|
||||
by pypy (mina#5656)
|
||||
Binary file not shown.
@@ -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: {
|
||||
code: string
|
||||
|
||||
Reference in New Issue
Block a user