mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-20 11:51:17 +00:00
Fix: When frontend cannot renew token, log out the user
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
8194d1b80f
commit
a12dbc0ed3
1 changed files with 5 additions and 0 deletions
|
@ -122,6 +122,11 @@ const app = createApp({
|
|||
fetch('config-editor/refreshToken', this.$root.fetchOpts)
|
||||
.then((resp: Response) => this.$root.parseResponseFromJSON(resp))
|
||||
.then((data: any) => this.login(data.token, new Date(data.expiresAt), data.user))
|
||||
.catch(err => {
|
||||
// Being unable to renew a token is a reason to logout
|
||||
this.logout()
|
||||
throw err
|
||||
})
|
||||
},
|
||||
|
||||
unregisterTicker(id: string): void {
|
||||
|
|
Loading…
Reference in a new issue