mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2024-09-30 04:57:50 +02:00
logout on 403 code, close #189
This commit is contained in:
parent
ebb2f80328
commit
7d61e490e5
@ -451,6 +451,13 @@ class MojangAccount extends McAccount {
|
||||
clientToken: this.clientToken
|
||||
}),
|
||||
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())
|
||||
|
Loading…
Reference in New Issue
Block a user