chore: Auth plugin and admin guard UUID migration (#206) #212
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Relates to #206
Milestone 2: Auth plugin and admin guard
Update the auth plugin to use profile.id UUID as userContext.userId instead of raw JWT sub. Update admin guard to query by user_profile_id.
Files
backend/src/core/plugins/auth.plugin.tsbackend/src/core/plugins/admin-guard.plugin.tsKey Changes
userIdtoauth0Subfor JWT sub. After getOrCreate, setuserId = profile.idWHERE user_profile_id = $1instead ofWHERE auth0_sub = $1Acceptance Criteria