fix login not working without a refresh when fake user is enabled

This commit is contained in:
MiniDigger 2021-02-13 12:15:14 +01:00
parent e4e5644d02
commit a068692172

View File

@ -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) {