mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2025-01-09 19:48:37 +01:00
cleanup
This commit is contained in:
parent
45fc6e4f40
commit
f66f6ea3dd
11
.github/workflows/dependencyUpdates.yml
vendored
11
.github/workflows/dependencyUpdates.yml
vendored
@ -1,11 +0,0 @@
|
||||
name: Gradle dependencyUpdates
|
||||
on: [ push, pull_request ]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 16
|
||||
- run: ./gradlew dependencyUpdates
|
@ -135,10 +135,6 @@ Fabric client:
|
||||
|
||||
### Accounts
|
||||
|
||||
#### My Microsoft account <18 years old is not able to log in, it's showing XSTS error:
|
||||
|
||||
- Add your account to a family (see https://wiki.vg/Microsoft_Authentication_Scheme#Authenticate_with_XSTS)
|
||||
|
||||
#### Why to use an online webpage for online mode?:
|
||||
|
||||
- It's easier to maintain in that way, because providing login via chat requires encoding and decoding more packets,
|
||||
|
@ -15,7 +15,6 @@ plugins {
|
||||
kotlin("jvm") version "1.5.31"
|
||||
id("maven-publish")
|
||||
id("com.github.johnrengelman.shadow") version "7.0.0"
|
||||
id("com.github.ben-manes.versions") version "0.39.0"
|
||||
id("com.palantir.git-version") version "0.12.3"
|
||||
id("org.gradlewebtools.minify") version "1.3.0" apply false
|
||||
}
|
||||
|
@ -512,6 +512,21 @@ class MicrosoftAccount extends McAccount {
|
||||
}),
|
||||
headers: {"content-type": "application/json"}
|
||||
})
|
||||
.then(data => {
|
||||
if (data.status !== 401) return data;
|
||||
return data.json().then(errorData => {
|
||||
let error = errorData.XErr;
|
||||
switch (error) {
|
||||
case 2148916233:
|
||||
throw "Xbox account not found";
|
||||
case 2148916235:
|
||||
throw "Xbox Live not available in this country";
|
||||
case 2148916238:
|
||||
throw "Account is underage, add it to a family";
|
||||
}
|
||||
throw "xsts error code " + error;
|
||||
});
|
||||
})
|
||||
.then(checkFetchSuccess("xsts response not success"))
|
||||
.then(r => r.json()))
|
||||
.then(json => fetch(getCorsProxy() + "https://api.minecraftservices.com/authentication/login_with_xbox", {
|
||||
@ -526,8 +541,8 @@ class MicrosoftAccount extends McAccount {
|
||||
headers: {"content-type": "application/json", "authorization": "Bearer " + json.access_token}
|
||||
})
|
||||
.then(profile => {
|
||||
if (profile.status === 404) return {id: "MHF_Exclamation", name: "[DEMO]", access_token: ""};
|
||||
if (!profile.ok) throw "profile response not success";
|
||||
if (profile.status === 404) throw "Minecraft profile not found";
|
||||
if (!profile.ok) throw "profile response not success " + profile.status;
|
||||
return profile.json();
|
||||
})
|
||||
.then(jsonProfile => {
|
||||
|
Loading…
Reference in New Issue
Block a user