Uploadthing and Clerk work together?

Hey all! I'm not a developer by any stretch of imagination, but I'm using Clerk for user management in a T3 web app I'm trying to develop. Can I use Uploadthing for the photos users will be uploading to their blog-like posts in my app or do I need to write my own auth code and forget about Clerk?
7 Replies
swikarrr
swikarrr2y ago
i don't think you need use any kind of auth for using upload thing.
Mike
MikeOP2y ago
Only authenticated users can upload photos, so it might matter.
GutoGalego
GutoGalego2y ago
Auth comes in before the request to upload stuff is made. Maybe you're mixing stuff up a bit You're using the t3 stack, so, say a user hit's the "upload" endpoint or whatever in your server route. It will be "unauthorized" because the user is not authed in
GutoGalego
GutoGalego2y ago
Usually, in T3 what I see is that people (including theo) create a private procedure in TRPC. https://trpc.io/docs/server/procedures
Define Procedures | tRPC
A procedure is a function which is exposed to the client, it can be one of:
GutoGalego
GutoGalego2y ago
Auth is one thing, the other functionalities of you app are another thing. You can make it so that any functionality is unavailable if a user is not logged in
Mike
MikeOP2y ago
Thanks. Sounds like I can use them together.
GutoGalego
GutoGalego2y ago
Yep, you definitely can
Want results from more Discord servers?
Add your server