major: Migration from better-auth to keycloak
This commit is contained in:
@@ -60,13 +60,14 @@ const colors = [
|
||||
]
|
||||
const neutrals = ['slate', 'gray', 'zinc', 'neutral', 'stone']
|
||||
|
||||
const { user: betterAuthUser, signOut } = await useAuth()
|
||||
const userStore = useUserStore()
|
||||
const { user: keyCloakUser } = storeToRefs(userStore)
|
||||
|
||||
const user = ref({
|
||||
name: betterAuthUser.value?.name,
|
||||
name: keyCloakUser.value.name,
|
||||
avatar: {
|
||||
src: '/_nuxt/public/favicon.ico',
|
||||
alt: betterAuthUser.value?.name
|
||||
alt: keyCloakUser.value.name
|
||||
}
|
||||
})
|
||||
|
||||
@@ -178,7 +179,7 @@ const items = computed<DropdownMenuItem[][]>(() => [
|
||||
icon: 'i-lucide-log-out',
|
||||
async onSelect(e: Event) {
|
||||
e.preventDefault()
|
||||
await signOut({ redirectTo: '/' })
|
||||
await navigateTo('/auth/logout', { external: true })
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user