diff --git a/frontend/src/stores/authStore.js b/frontend/src/stores/authStore.js index 06a414b..01b345a 100644 --- a/frontend/src/stores/authStore.js +++ b/frontend/src/stores/authStore.js @@ -9,7 +9,6 @@ function getClaimsFromToken(token) { try { return jwtDecode(token); } catch (error) { - console.error('Invalid token:', error); return null; } } @@ -27,7 +26,7 @@ export const useAuthStore = defineStore( const userId = computed(() => { const claims = getClaimsFromToken(accessToken.value) - return claims.sub; + return claims?.sub; }) function updateTokens(data) {