Prashant
TTCTheo's Typesafe Cult
•Created by shawn on 3/26/2025 in #questions
Auth in middleware
can we still implement cors and rate limiting in middleware??
27 replies
TTCTheo's Typesafe Cult
•Created by shawn on 3/26/2025 in #questions
Auth in middleware
I have one more doubt, so we can't use nextjs middlware to proctect the api endpoints, but we can still use it as an early return like in this case
if the user is already looged in, we can redirect him to /dashboard and also vise versa, right?
I wonder can we utilze tRPC in this anyway? My all api endpoints are behind the trpc procedures so they are secured now I want to limit the frontend access, can we also use trpc in this by anyway ??
27 replies
TTCTheo's Typesafe Cult
•Created by shawn on 3/26/2025 in #questions
Auth in middleware
got it 👍
27 replies
TTCTheo's Typesafe Cult
•Created by shawn on 3/26/2025 in #questions
Auth in middleware
Okay, I have seen all the information around this middleware stuff and watched Theo's video. I want to make sure I got this right. Let's say in the middleware I have something like this: if(pathName.includes("/admin") && session.user.role !== "ADMIN"){
redirect the user to another page or do something;}
This is NOT enough to protect my /admin/* routes, right? I should also check it in /admin/dashboard, correct? If I understand this correctly, I have one question: let's say I have 5-6 routes under /admin/*. Do I have to put this check on all these routes separately?
27 replies
TTCTheo's Typesafe Cult
•Created by Prashant on 12/30/2024 in #questions
Status: Callback Failed
lemme loom at it
12 replies
TTCTheo's Typesafe Cult
•Created by Prashant on 12/30/2024 in #questions
Status: Callback Failed

12 replies
TTCTheo's Typesafe Cult
•Created by Prashant on 12/30/2024 in #questions
Status: Callback Failed

12 replies
TTCTheo's Typesafe Cult
•Created by Prashant on 12/30/2024 in #questions
Status: Callback Failed

12 replies
TTCTheo's Typesafe Cult
•Created by Prashant on 12/30/2024 in #questions
Status: Callback Failed
I am using t3 app
12 replies
TTCTheo's Typesafe Cult
•Created by Prashant on 12/30/2024 in #questions
Status: Callback Failed
this is the uploadthing dashboard itself
12 replies