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
swikarrr12mo ago
i don't think you need use any kind of auth for using upload thing.
Mike
Mike12mo ago
Only authenticated users can upload photos, so it might matter.
GutoGalego
GutoGalego12mo 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
GutoGalego12mo 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
GutoGalego12mo 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
Mike12mo ago
Thanks. Sounds like I can use them together.
GutoGalego
GutoGalego12mo ago
Yep, you definitely can