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•3y ago
Message Not Public
Sign In & Join Server To View
Yeah I ended up using
getUser
for it
I also looked into the implementation
it's not documented properly
thanksUnknown User•2y ago
Message Not Public
Sign In & Join Server To View
this link is down, any chance you could find it again?
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.