diff options
| author | TheKodeToad <TheKodeToad@proton.me> | 2023-07-31 14:40:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-31 14:40:27 +0100 |
| commit | b572f75dbaad61cf305f1fd4f60ba94d74bfa3fa (patch) | |
| tree | 4e1ad65d3e51a1c3a1d7cae3a203fadddb3bbc2f /launcher/minecraft/auth | |
| parent | 719d87de3bb6f65bc63ad518126074fd9f5f6283 (diff) | |
| parent | 9137721e8e5b44f2338a36874a393435cbc6daa3 (diff) | |
| download | PrismLauncher-b572f75dbaad61cf305f1fd4f60ba94d74bfa3fa.tar.gz PrismLauncher-b572f75dbaad61cf305f1fd4f60ba94d74bfa3fa.tar.bz2 PrismLauncher-b572f75dbaad61cf305f1fd4f60ba94d74bfa3fa.zip | |
Merge branch 'PrismLauncher:develop' into icon-indexing
Diffstat (limited to 'launcher/minecraft/auth')
| -rw-r--r-- | launcher/minecraft/auth/AccountData.cpp | 4 | ||||
| -rw-r--r-- | launcher/minecraft/auth/MinecraftAccount.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/launcher/minecraft/auth/AccountData.cpp b/launcher/minecraft/auth/AccountData.cpp index 44f7e256..0b78cb0c 100644 --- a/launcher/minecraft/auth/AccountData.cpp +++ b/launcher/minecraft/auth/AccountData.cpp @@ -374,6 +374,10 @@ bool AccountData::resumeStateFromV3(QJsonObject data) { } yggdrasilToken = tokenFromJSONV3(data, "ygg"); + // versions before 7.2 used "offline" as the offline token + if (yggdrasilToken.token == "offline") + yggdrasilToken.token = "0"; + minecraftProfile = profileFromJSONV3(data, "profile"); if(!entitlementFromJSONV3(data, minecraftEntitlement)) { if(minecraftProfile.validity != Katabasis::Validity::None) { diff --git a/launcher/minecraft/auth/MinecraftAccount.cpp b/launcher/minecraft/auth/MinecraftAccount.cpp index d7b061e5..5d279af1 100644 --- a/launcher/minecraft/auth/MinecraftAccount.cpp +++ b/launcher/minecraft/auth/MinecraftAccount.cpp @@ -94,7 +94,7 @@ MinecraftAccountPtr MinecraftAccount::createOffline(const QString &username) { auto account = makeShared<MinecraftAccount>(); account->data.type = AccountType::Offline; - account->data.yggdrasilToken.token = "offline"; + account->data.yggdrasilToken.token = "0"; account->data.yggdrasilToken.validity = Katabasis::Validity::Certain; account->data.yggdrasilToken.issueInstant = QDateTime::currentDateTimeUtc(); account->data.yggdrasilToken.extra["userName"] = username; |
