handle malformed token

This commit is contained in:
SrGooglo 2024-04-21 23:25:13 +02:00
parent 4cb93e9878
commit 4ca2410f0a

View File

@ -1,6 +1,7 @@
import open from "open"
import axios from "axios"
import ManifestAuthDB from "../../../classes/ManifestAuthDB"
import UnauthorizeMethod from "../../../handlers/deauthorize"
export default class Auth {
constructor(ctx) {
@ -25,6 +26,14 @@ export default class Auth {
}).catch((err) => {
global._relic_eventBus.emit("auth:getter:error", err)
try {
UnauthorizeMethod(this.manifest.id).then(() => {
this.request()
})
} catch (error) {
console.error(error)
}
return err
})