Deleting files with UTApi, unauthorized

Hey, I'm trying to delete a recently uploaded file when the form is closed but I'm running into auth errors, please can someone help me to understand what I'm missing with the setup - screenshots attached onUploadComplete stores the file url in the form (and updates the useState to trigger a refresh) 1st ss: trpc mutation 2nd ss: onClose fn for form close 3rd ss: upload component
No description
No description
No description
4 Replies
hyhy
hyhy8mo ago
looking at the docs, it seems like i shouldn't even need to pass through a secret, the default should do it
No description
hyhy
hyhy8mo ago
No description
hyhy
hyhy8mo ago
This isn't an issue with ut, it's an issue with my auth validation, for some reason it's not able to read the user role
hyhy
hyhy8mo ago
this is the error message being hit
No description