Adding Supabase to TRPC context
I am using Supabase for auth and db in a create t3 app project and I was curious if this would be the correct way to get the user session data into the trcp context.
I modified the createTRCPContext method to this...
server/api/trpc.ts
or alternatively is it actually possible to just create a supabaseServerClient / createRouteHandlerClient within the TRCP procedures themselves whenever I need access to the session data?8 Replies
https://github.com/supabase-community/create-t3-turbo
This might help you. Got it working some hours ago with a Supabase project
GitHub
GitHub - supabase-community/create-t3-turbo: Clean and simple start...
Clean and simple starter repo using the T3 Stack along with Expo React Native and Supabase - GitHub - supabase-community/create-t3-turbo: Clean and simple starter repo using the T3 Stack along with...
Ill check it out thanks
I an windering if you can assist me @Benja
I am trying to get this working but am having an issue. I think i finally got the supabase pooler connection string working, and got rid of the error: now that error is gone, and I am getting error: @julius
I am trying to get this working but am having an issue. I think i finally got the supabase pooler connection string working, and got rid of the error: now that error is gone, and I am getting error: @julius
![No description](https://cdn.answeroverflow.com/1193944393816756304/image.png)
I commented out and it loaded up. I forgot I had that issue on another t3 project. Why does it errror out withc that line in there? Can I make it a variable value based on development or production?
It should work on edge if you set it up correctly
Unless you have other deps in your router that doesn’t
it should work locally with the edge runtime?
on every t3 app I have worked in it always gives me errors developing locally with runtime=edge, on my windows pc and macbook :/
Yes