Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to MinecraftAuth #4779

Merged
merged 22 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8c89615
Initial work on porting to MinecraftAuth
AlexProgrammerDE Jun 20, 2024
07522a7
Fix offline access order
AlexProgrammerDE Jun 20, 2024
11a0293
Merge branch 'master' into minecraftauth
Kas-tle Jun 24, 2024
c4a4688
Merge branch 'master' into minecraftauth
AlexProgrammerDE Jul 1, 2024
517a69e
Fix two null issues
AlexProgrammerDE Jul 1, 2024
adff671
Merge remote-tracking branch 'origin/minecraftauth' into minecraftauth
AlexProgrammerDE Jul 1, 2024
fd95700
Cleanup
AlexProgrammerDE Jul 1, 2024
59495d8
Fix: mappings
onebeastchris Jul 11, 2024
450af55
Add migration from refresh tokens to auth chains
onebeastchris Jul 12, 2024
681fac6
Merge remote-tracking branch 'refs/remotes/upstream/master' into fork…
onebeastchris Jul 18, 2024
2d80429
Attempt to implement auth saving
onebeastchris Jul 18, 2024
e4e7940
remove unnecessary diff
onebeastchris Jul 18, 2024
add31d1
Use static Gson
AlexProgrammerDE Jul 18, 2024
ed795b2
Properly save auth chain
AlexProgrammerDE Jul 18, 2024
12691ac
Address review
AlexProgrammerDE Jul 18, 2024
ac98b76
Update core/src/main/java/org/geysermc/geyser/translator/protocol/bed…
AlexProgrammerDE Jul 20, 2024
4a6d480
Bump mcauth
AlexProgrammerDE Jul 21, 2024
6cb27a1
Merge remote-tracking branch 'origin/minecraftauth' into minecraftauth
AlexProgrammerDE Jul 21, 2024
37806bd
Merge remote-tracking branch 'upstream/master' into minecraftauth
AlexProgrammerDE Jul 21, 2024
37338b7
Add log info
AlexProgrammerDE Jul 24, 2024
0296aeb
Use resultNow since we know the future is always done when onMicrosof…
AlexProgrammerDE Jul 24, 2024
fbea2cb
Don't use new API
Camotoy Jul 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove unnecessary diff
  • Loading branch information
onebeastchris committed Jul 18, 2024
commit e4e79406aec65215754bee5031e9dd14369214e4
4 changes: 1 addition & 3 deletions core/src/main/java/org/geysermc/geyser/GeyserImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,8 @@ private void startInstance() {
);

String authChain = gson.toJson(javaSession.toJson(fullJavaSession));
GeyserImpl.getInstance().getLogger().warning("new auth chain: " + authChain);
savedAuthChains.put(user, authChain);
} catch (Exception e) {
GeyserImpl.getInstance().getLogger().severe(e.getMessage(), e);
GeyserImpl.getInstance().getLogger().warning("Could not migrate " + entry.getKey() + " to an auth chain! " +
"They will need to sign in the next time they join Geyser.");
}
Expand All @@ -615,9 +613,9 @@ private void startInstance() {
} catch (IOException e) {
logger.error("Cannot load saved user tokens!", e);
}
boolean doWrite = false;
if (authChainFile != null) {
List<String> validUsers = config.getSavedUserLogins();
boolean doWrite = false;
for (Map.Entry<String, String> entry : authChainFile.entrySet()) {
String user = entry.getKey();
if (!validUsers.contains(user)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,7 @@ public boolean onMicrosoftLoginComplete(PendingMicrosoftAuthentication.Authentic
new GameProfile(mcProfile.getId(), mcProfile.getName()),
mcToken.getAccessToken()
);

try {
connectDownstream();
} catch (Throwable t) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ public class PendingMicrosoftAuthentication {
.withoutDeviceToken()
.regularAuthentication(MicrosoftConstants.JAVA_XSTS_RELYING_PARTY)
.buildMinecraftJavaProfileStep(false);


/**
* For GeyserConnect usage.
*/
Expand Down