Transit
This commit is contained in:
@@ -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}
|
||||
})
|
||||
|
||||
})
|
||||
Reference in New Issue
Block a user