Purpose of auth.ts file
Is it just there to showcase the use of protectedProcedure or what should generally go in there? Let's say I have a recipe app and I want only logged in users to be able to create a recipe. I suppose I'd have to use the protectedProcedure in a file like "recipe.ts" and not "auth.ts" to do that, right?
Thank you!
3 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Okay, thank you! To add the 3 more levels, you have modified the prisma user schema with a "role" attribute and added functions like "isAdmin" etc. to be used in the exported "adminProcedure" etc. like with the "isAuthed" and "protectedProcedure" functions?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View