Skip to content

Commit

Permalink
revert: Trying to fix some auth issues
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz committed Apr 3, 2024
1 parent 4a382f2 commit b5f50fb
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/main/kotlin/com/mineinabyss/launchy/logic/Auth.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,14 @@ object Auth {
onVerificationRequired: (VerificationRequired) -> Unit,
onAuthenticate: (FullJavaSession) -> Unit,
) {
val testAuth = MinecraftAuth.builder()
.withClientId("00000000402b5328")
.withScope("service::user.auth.xboxlive.com::MBI_SSL")
.deviceCode()
.withDeviceToken("Win32")
.sisuTitleAuthentication("https://multiplayer.minecraft.net/")
.buildMinecraftJavaProfileStep(true);
val httpClient = MinecraftAuth.createHttpClient()
val previousSession = state.currentProfile?.let { SessionStorage.load(it.uuid) }
if (previousSession != null) {
val refreshedSession = testAuth.refresh(httpClient, previousSession)
val refreshedSession = MinecraftAuth.JAVA_DEVICE_CODE_LOGIN.refresh(httpClient, previousSession)
onAuthenticate(refreshedSession)
return
}
val javaSession = testAuth.getFromInput(
val javaSession = MinecraftAuth.JAVA_DEVICE_CODE_LOGIN.getFromInput(
httpClient,
MsaDeviceCodeCallback { msaDeviceCode: MsaDeviceCode ->
onVerificationRequired(
Expand Down

0 comments on commit b5f50fb

Please sign in to comment.