Almost every iOS app I start needs the same first hour of work: email sign-in, a place to keep per-user data, and a way to make sure users can only touch their own rows. Supabase gives you most of it. The part people get wrong is the profiles table , because the obvious version is also the insecure one.
This post walks through the setup I use: the SQL, the Swift, and the three mistakes to avoid. It assumes you know basic SwiftUI and have a free Supabase project.
The model: two tables, one id
Supabase Auth stores credentials in auth.users . You don't add your own columns there. Instead you create a public.profiles table whose primary key is the auth user's id:
create table if not exists public . profiles ( id uuid primary key references auth .…