logout on 403 code, close #189

This commit is contained in:
creeper123123321 2021-12-20 21:26:36 -03:00
parent ebb2f80328
commit 7d61e490e5

View File

@ -452,6 +452,13 @@ class MojangAccount extends McAccount {
}),
headers: {"content-type": "application/json"},
})
.then(r => {
if (r.status == 403) {
this.logout();
throw "403, token expired?";
}
return r;
})
.then(checkFetchSuccess("code"))
.then(r => r.json())
.then(json => {