From a068692172a98dfdc21dec4ae1e17f8ed5ae53fe Mon Sep 17 00:00:00 2001 From: MiniDigger Date: Sat, 13 Feb 2021 12:15:14 +0100 Subject: [PATCH] fix login not working without a refresh when fake user is enabled --- frontend/middleware/auth.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/middleware/auth.ts b/frontend/middleware/auth.ts index f3b99b0e3..d8fa5757d 100644 --- a/frontend/middleware/auth.ts +++ b/frontend/middleware/auth.ts @@ -11,7 +11,8 @@ export default async ({ app: { $cookies }, $auth, $api, store, redirect }: Conte path: '/', }); redirect(returnRoute); - } else if ($cookies.get('HangarAuth_REFRESH', { parseJSON: false })) { + } + if ($cookies.get('HangarAuth_REFRESH', { parseJSON: false })) { const token = await $api.getToken(true); if (token != null) { if (store.state.auth.authenticated) {