Summary
The profile page (app/pages/admin/profile.vue) bypasses useUser() and directly accesses useState('auth0_user') and useState('tlv2_user_roles') because useUser() is not reactive to session enrichment in @interline-io/tlv2-auth.
This couples the page to internal state key names that could change in tlv2-auth.
What needs to happen
- Fix
useUser() in @interline-io/tlv2-auth so it returns reactive state that updates after session enrichment (e.g., when roles are fetched)
- Update
app/pages/admin/profile.vue to use useUser() instead of raw useState calls
- Remove the TODO comment
Context
Introduced in #324 (tlv2-ui → tlv2-auth migration). See app/pages/admin/profile.vue:31-39.
Summary
The profile page (
app/pages/admin/profile.vue) bypassesuseUser()and directly accessesuseState('auth0_user')anduseState('tlv2_user_roles')becauseuseUser()is not reactive to session enrichment in@interline-io/tlv2-auth.This couples the page to internal state key names that could change in tlv2-auth.
What needs to happen
useUser()in@interline-io/tlv2-authso it returns reactive state that updates after session enrichment (e.g., when roles are fetched)app/pages/admin/profile.vueto useuseUser()instead of rawuseStatecallsContext
Introduced in #324 (tlv2-ui → tlv2-auth migration). See
app/pages/admin/profile.vue:31-39.