This commit is contained in:
2025-02-07 15:44:59 -05:00
parent 2b30479263
commit 009368ca8f
38 changed files with 1815 additions and 945 deletions

View File

@@ -24,6 +24,7 @@ export const useAuthStore = defineStore(
const refreshToken = useSessionStorage('auth-refreshToken', undefined)
const isAuthenticated = computed(() => !!accessToken.value)
const userId = computed(() => {
const claims = getClaimsFromToken(accessToken.value)
return claims.sub;
@@ -98,5 +99,4 @@ export const useAuthStore = defineStore(
}
return {accessToken, refreshToken, isAuthenticated, userId, login, loginWithGoogle, logout}
})
})