diff --git a/src/main/java/site/hackery/unknit/auth/GameAuthenticationFlow.java b/src/main/java/site/hackery/unknit/auth/GameAuthenticationFlow.java index 6b3a936..19b9184 100644 --- a/src/main/java/site/hackery/unknit/auth/GameAuthenticationFlow.java +++ b/src/main/java/site/hackery/unknit/auth/GameAuthenticationFlow.java @@ -35,14 +35,7 @@ public class GameAuthenticationFlow { saveAuthData(authenticator.getResultFile()); User user = userOpt.get(); - return new Session( - user.getName(), - user.getUuid(), - user.getAccessToken(), - Optional.empty(), - Optional.empty(), - Session.AccountType.byName(user.getType()) - ); + return new Session(user.getName(), user.getUuid(), user.getAccessToken(), Optional.empty(), Optional.empty(), Session.AccountType.byName(user.getType())); } } catch (AuthenticationException | IOException ignored) { } @@ -77,7 +70,7 @@ public class GameAuthenticationFlow { String password = System.getenv("AUTH_PASSWORD"); if (username == null || password == null) { - throw new RuntimeException("Attempted to perform Mojang authentication without AUTH_USERNAME or AUTH_PASSWORD set"); + throw new RuntimeException("Attempted to perform Mojang authentication without AUTH_USERNAME or AUTH_PASSWORD set."); } return Authenticator.ofYggdrasil("-", username, password).shouldAuthenticate(); @@ -86,7 +79,7 @@ public class GameAuthenticationFlow { private static Authenticator.Builder createMicrosoftAuthenticator() { String token = System.getenv("AUTH_TOKEN"); if (token == null) { - throw new RuntimeException("Attempted to perform Microsoft authentication without AUTH_TOKEN set"); + throw new RuntimeException("Attempted to perform Microsoft authentication without AUTH_TOKEN set. You may want to visit " + Authenticator.microsoftLogin()); } return Authenticator.ofMicrosoft(token).shouldAuthenticate();