[FIX] JsonCoreProvider: update accessToken

This commit is contained in:
Gravita 2021-05-25 17:54:45 +07:00
parent be78caa841
commit 5a349afe9d

View file

@ -192,7 +192,10 @@ public PasswordVerifyReport verifyPassword(User user, AuthRequest.AuthPasswordIn
@Override @Override
public AuthManager.AuthReport createOAuthSession(User user, AuthResponse.AuthContext context, PasswordVerifyReport report, boolean minecraftAccess) throws IOException { 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); 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 @Override