Supabase unironically do exactly that. You’ve got your client, you login through OAuth, then use your JWT to connect directly to postgres.
Your JWT contains your user id, which is used with row level security rules to determine which rows you can and cannot access. It’s pretty amazing what you can do with PG alone. The tooling is not quite there yet but that’s probably where we’re headed.
Supabase unironically do exactly that. You’ve got your client, you login through OAuth, then use your JWT to connect directly to postgres.
Your JWT contains your user id, which is used with row level security rules to determine which rows you can and cannot access. It’s pretty amazing what you can do with PG alone. The tooling is not quite there yet but that’s probably where we’re headed.