From a4a978afafe1f6a4d46f0f1362b38badabb3773f Mon Sep 17 00:00:00 2001 From: Beyley Thomas Date: Sat, 19 Oct 2024 21:42:32 -0700 Subject: [PATCH] Automatically verify IP upon successful login --- .../Endpoints/Game/Handshake/AuthenticationEndpoints.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Refresh.GameServer/Endpoints/Game/Handshake/AuthenticationEndpoints.cs b/Refresh.GameServer/Endpoints/Game/Handshake/AuthenticationEndpoints.cs index af4b40fa..f15e6513 100644 --- a/Refresh.GameServer/Endpoints/Game/Handshake/AuthenticationEndpoints.cs +++ b/Refresh.GameServer/Endpoints/Game/Handshake/AuthenticationEndpoints.cs @@ -163,7 +163,10 @@ public class AuthenticationEndpoints : EndpointGroup // Mark the user as disconnected from the presence server database.SetUserPresenceAuthToken(user, null); - + + if (!database.IsIpVerified(user, ipAddress)) + database.AddVerifiedIp(user, ipAddress, timeProvider); + context.Logger.LogInfo(BunkumCategory.Authentication, $"{user} successfully logged in on {game} via {platform}"); if (game == TokenGame.LittleBigPlanetPSP)