supabase auth with trpc?

I can't seem to figure out a good way to add supabase auth to trpc similar to how nextauth is integrated in create-t3-app. I am specifically having issues creating a protected trpc route with supabase auth They have the withApiAuth for protected routes, but I want something similar to getServerSession that just returns a null value that I can write code to handle.
5 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
devagr
devagr2y ago
Yeah I ended up using getUser for it I also looked into the implementation it's not documented properly thanks
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
rovrav
rovrav2y ago
this link is down, any chance you could find it again?
jdsl
jdsl2y ago
They've deprecated some of those helpers. This appears to be the current way to do things now: https://supabase.com/docs/guides/auth/auth-helpers/nextjs
Supabase Auth with Next.js | Supabase Docs
Authentication helpers for Next.js API routes, middleware, and SSR.
Want results from more Discord servers?
Add your server