From e36cfea4f9ce308de6ef7e192a1c6561801ea191 Mon Sep 17 00:00:00 2001 From: Gravit Date: Sun, 20 Jun 2021 12:01:39 +0700 Subject: [PATCH] [FIX] Bad Login (Clientside) in MySQLAuthCoreProvider --- .../pro/gravit/launchserver/auth/core/MySQLCoreProvider.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java index eba8c911..182f7789 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java @@ -166,6 +166,8 @@ public void init(LaunchServer server) { protected boolean updateAuth(User user, String accessToken) throws IOException { try (Connection c = mySQLHolder.getConnection()) { + MySQLUser mySQLUser = (MySQLUser) user; + mySQLUser.accessToken = accessToken; PreparedStatement s = c.prepareStatement(updateAuthSQL); s.setString(1, accessToken); s.setString(2, user.getUUID().toString()); @@ -179,6 +181,8 @@ protected boolean updateAuth(User user, String accessToken) throws IOException { @Override protected boolean updateServerID(User user, String serverID) throws IOException { try (Connection c = mySQLHolder.getConnection()) { + MySQLUser mySQLUser = (MySQLUser) user; + mySQLUser.serverId = serverID; PreparedStatement s = c.prepareStatement(updateServerIDSQL); s.setString(1, serverID); s.setString(2, user.getUUID().toString());