From eefb025ce2e7a73b49c1bfab01a494953ead9e1f Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Thu, 11 Apr 2024 09:57:57 +0200 Subject: [PATCH] save new user token when silently refreshing token --- frontend/src/pages/silent-refresh/+Page.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/pages/silent-refresh/+Page.vue b/frontend/src/pages/silent-refresh/+Page.vue index 708ea5e390..e46696f57d 100644 --- a/frontend/src/pages/silent-refresh/+Page.vue +++ b/frontend/src/pages/silent-refresh/+Page.vue @@ -10,12 +10,15 @@ import { inject, onBeforeMount } from 'vue' import DefaultLayout from '#layouts/DefaultLayout.vue' import AuthService from '#src/services/AuthService' +import { useAuthStore } from '#stores/authStore.js' const authService = inject('authService') +const auth = useAuthStore() onBeforeMount(async () => { try { await authService?.renewToken() + auth.save((await authService?.getUser()) || null) navigate('/') } catch (error) { // eslint-disable-next-line no-console