From 5a349afe9da1c74becc312b4cb3d287c88bf1c34 Mon Sep 17 00:00:00 2001 From: Gravita Date: Tue, 25 May 2021 17:54:45 +0700 Subject: [PATCH] [FIX] JsonCoreProvider: update accessToken --- .../pro/gravit/launchserver/auth/core/JsonCoreProvider.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/JsonCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/JsonCoreProvider.java index a8960449..fd2a47cb 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/JsonCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/JsonCoreProvider.java @@ -192,7 +192,10 @@ public PasswordVerifyReport verifyPassword(User user, AuthRequest.AuthPasswordIn @Override public AuthManager.AuthReport createOAuthSession(User user, AuthResponse.AuthContext context, PasswordVerifyReport report, boolean minecraftAccess) throws IOException { JsonAuthReportResponse response = jsonRequest(new JsonCreateOAuthSession(user.getUsername(), user.getUUID(), minecraftAccess), createOAuthSessionUrl, JsonAuthReportResponse.class); - return response == null ? null : response.toAuthReport(); + if (response == null) return null; + JsonUser user1 = (JsonUser) user; + user1.accessToken = response.minecraftAccessToken; + return response.toAuthReport(); } @Override