forked from zombieb/undead-universal-patch-il2cpp
refresh token fix
This commit is contained in:
@@ -22,6 +22,7 @@ namespace undead_universal_patch_il2cpp.Core.Config
|
||||
public static ConfigEntry<bool> ImageSignaturePatch;
|
||||
public static ConfigEntry<bool> RegistrationPatch;
|
||||
public static ConfigEntry<bool> AFKPatch;
|
||||
public static ConfigEntry<bool> RefreshTokenFix;
|
||||
}
|
||||
public static class PatchConfigDefaults
|
||||
{
|
||||
@@ -31,6 +32,7 @@ namespace undead_universal_patch_il2cpp.Core.Config
|
||||
public static bool ImageSignaturePatch = false;
|
||||
public static bool RegistrationPatch = false;
|
||||
public static bool AFKPatch = false;
|
||||
public static bool RefreshTokenFix = false;
|
||||
}
|
||||
public static class ServerPatchesConfig
|
||||
{
|
||||
|
||||
15
Core/Init.cs
15
Core/Init.cs
@@ -74,20 +74,23 @@ public class Initialization
|
||||
"Log all BestHTTP requests sent by the game.");
|
||||
GenericConfig.VerboseRequestLogs = UniversalPatchPlugin.Instance.Config.Bind("Generic", "VerboseRequestLogs", GenericConfigDefaults.VerboseRequestLogs,
|
||||
"Add additional request information to BestHTTPProxy logs. Requires LogAllRequest to be enabled.");
|
||||
PatchConfig.CertificatePatch = UniversalPatchPlugin.Instance.Config.Bind("Generic", "CertificatePatch", PatchConfigDefaults.CertificatePatch,
|
||||
PatchConfig.CertificatePatch = UniversalPatchPlugin.Instance.Config.Bind("Patches", "CertificatePatch", PatchConfigDefaults.CertificatePatch,
|
||||
"The game expects a certain certificate from rec.net when making HTTPS requests. Enable this to allow any valid certificate.");
|
||||
PatchConfig.HilePatch = UniversalPatchPlugin.Instance.Config.Bind("Generic", "HilePatch", PatchConfigDefaults.HilePatch,
|
||||
PatchConfig.HilePatch = UniversalPatchPlugin.Instance.Config.Bind("Patches", "HilePatch", PatchConfigDefaults.HilePatch,
|
||||
"The game will close after a short period of time if BepInEx is found. Enable to stop this from happening." +
|
||||
"\nThis will also enable the AGRoomRuntimeConfig patch. See the README for more info.");
|
||||
PatchConfig.SignalRHandshakeFix = UniversalPatchPlugin.Instance.Config.Bind("Generic", "SignalRHandshakeFix", PatchConfigDefaults.SignalRHandshakeFix,
|
||||
PatchConfig.SignalRHandshakeFix = UniversalPatchPlugin.Instance.Config.Bind("Patches", "SignalRHandshakeFix", PatchConfigDefaults.SignalRHandshakeFix,
|
||||
"Replace apostrophes with quotes in the initial SignalR handshake.");
|
||||
PatchConfig.ImageSignaturePatch = UniversalPatchPlugin.Instance.Config.Bind("Generic", "ImageSignaturePatch", PatchConfigDefaults.ImageSignaturePatch,
|
||||
PatchConfig.ImageSignaturePatch = UniversalPatchPlugin.Instance.Config.Bind("Patches", "ImageSignaturePatch", PatchConfigDefaults.ImageSignaturePatch,
|
||||
"When enabled, all image signatures will be valid." +
|
||||
"\nWorks only if the server appends a properly formatted signature header (signature does not need to be valid)");
|
||||
PatchConfig.RegistrationPatch = UniversalPatchPlugin.Instance.Config.Bind("Generic", "RegistrationPatch", PatchConfigDefaults.RegistrationPatch,
|
||||
PatchConfig.RegistrationPatch = UniversalPatchPlugin.Instance.Config.Bind("Patches", "RegistrationPatch", PatchConfigDefaults.RegistrationPatch,
|
||||
"Always disable the registration prompt.");
|
||||
PatchConfig.AFKPatch = UniversalPatchPlugin.Instance.Config.Bind("Generic", "AFKPatch", PatchConfigDefaults.AFKPatch,
|
||||
PatchConfig.AFKPatch = UniversalPatchPlugin.Instance.Config.Bind("Patches", "AFKPatch", PatchConfigDefaults.AFKPatch,
|
||||
"Always present patch. Never get kicked to dorm for being AFK.");
|
||||
PatchConfig.RefreshTokenFix = UniversalPatchPlugin.Instance.Config.Bind("Patches", "RefreshTokenFix", PatchConfigDefaults.RefreshTokenFix,
|
||||
"Fix for the game needlessly requesting a refresh token in a loop. Cause for this issue is unknown." +
|
||||
"\nDon't enable unless you know what this does.");
|
||||
|
||||
ServerPatchesConfig.CustomEmotes = UniversalPatchPlugin.Instance.Config.Bind("ServerPatches", "CustomEmotes", ServerPatchesConfigDefaults.CustomEmotes,
|
||||
"Modify the game's emote text with a configuration from the server.");
|
||||
|
||||
27
Patches/RefreshTokenFix.cs
Normal file
27
Patches/RefreshTokenFix.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using HarmonyLib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using undead_universal_patch_il2cpp.Core;
|
||||
using undead_universal_patch_il2cpp.Core.Config;
|
||||
|
||||
namespace undead_universal_patch_il2cpp.Patches;
|
||||
|
||||
[HarmonyPatch]
|
||||
public class RefreshTokenFix
|
||||
{
|
||||
static PatchTypesResult patchResult = Util.ConfigPreparePatchTypes(
|
||||
PatchConfig.RefreshTokenFix,
|
||||
"Refresh token implementation fix for some servers",
|
||||
"RecNet.Login",
|
||||
"OnLocalAccountUpdated"
|
||||
);
|
||||
|
||||
static MethodBase TargetMethod() => patchResult.Method;
|
||||
static bool Prepare() => patchResult.Success;
|
||||
|
||||
static bool Prefix() => false;
|
||||
}
|
||||
@@ -6,7 +6,7 @@ using undead_universal_patch_il2cpp.Core;
|
||||
|
||||
namespace undead_universal_patch_il2cpp;
|
||||
|
||||
[BepInPlugin("dev.proxnet.recroom.universalpatch.noneac.il2cpp", "Undead Universal Patch", "2.2.0")]
|
||||
[BepInPlugin("dev.proxnet.recroom.universalpatch.noneac.il2cpp", "Undead Universal Patch", "3.0.0")]
|
||||
public class UniversalPatchPlugin : BasePlugin
|
||||
{
|
||||
public static new readonly ManualLogSource Log = Logger.CreateLogSource("UUPatch");
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<AssemblyName>undead_universal_patch_il2cpp</AssemblyName>
|
||||
<Description>Non-EAC, IL2CPP build patcher for Rec Room (Late 2018*-*April 2020) </Description>
|
||||
<Version>2.2.0</Version>
|
||||
<Version>3.0.0</Version>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<RestoreAdditionalProjectSources>
|
||||
|
||||
Reference in New Issue
Block a user