From 182bfa74c9811413b7f00f72799c7bee23b79b19 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Sun, 12 Oct 2025 03:26:38 -0600 Subject: [PATCH] Add user info header to authentication dropdown - Created /api/auth/userinfo endpoint to fetch user data from Authentik headers - Added userInfo state and fetchUserInfo() function to useAuth composable - Implemented compact user info header in dropdown with avatar, name, and email - Avatar shows user initials with gradient background - Styled with glassmorphism design matching app aesthetic --- components/AuthIndicator.client.vue | 73 ++++++++++++++++++++++++++++- composables/useAuth.ts | 24 ++++++++++ server/api/auth/userinfo.get.ts | 28 +++++++++++ 3 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 server/api/auth/userinfo.get.ts diff --git a/components/AuthIndicator.client.vue b/components/AuthIndicator.client.vue index be44064..29b13a4 100644 --- a/components/AuthIndicator.client.vue +++ b/components/AuthIndicator.client.vue @@ -30,6 +30,19 @@ :style="dropdownStyle" @click.stop > + +
+
+ {{ userInfo.initials }} +
+
+
{{ userInfo.name }}
+
{{ userInfo.email }}
+
+
+ + +