From 529f08db184f26517e3eeb3a5bd026b604eacb2f Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 13 Jun 2024 17:49:18 +0200 Subject: [PATCH] Improve login flow Signed-off-by: Knut Ahlers --- src/components/login.vue | 2 +- src/main.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/login.vue b/src/components/login.vue index 72a72e8..475c0e2 100644 --- a/src/components/login.vue +++ b/src/components/login.vue @@ -7,7 +7,7 @@ :disabled="loading" @click="openAuthURL" > - + Login with Twitch diff --git a/src/main.ts b/src/main.ts index c990b86..963ecc5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -67,6 +67,7 @@ const app = createApp({ // User token is not valid and therefore should be removed // which essentially triggers a logout this.logout() + throw new Error('user has been logged out') } return resp @@ -146,6 +147,7 @@ const app = createApp({ }) .then((resp: Response): any => { if (resp.status !== 200) { + this.$root.bus.emit('login-processing', false) throw new Error(`login failed, status=${resp.status}`) }