mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2024-07-01 11:14:50 +02:00
logout on 403 code, close #189
This commit is contained in:
parent
ebb2f80328
commit
7d61e490e5
|
@ -452,6 +452,13 @@ class MojangAccount extends McAccount {
|
||||||
}),
|
}),
|
||||||
headers: {"content-type": "application/json"},
|
headers: {"content-type": "application/json"},
|
||||||
})
|
})
|
||||||
|
.then(r => {
|
||||||
|
if (r.status == 403) {
|
||||||
|
this.logout();
|
||||||
|
throw "403, token expired?";
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
})
|
||||||
.then(checkFetchSuccess("code"))
|
.then(checkFetchSuccess("code"))
|
||||||
.then(r => r.json())
|
.then(r => r.json())
|
||||||
.then(json => {
|
.then(json => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user