Skip to main content
Hostwares

How to Create User Profiles with Supabase

sowad sheikh··1 min read

Supabase Auth manages authentication, but your application often needs more information about each user. For example, you may want to store a display name, avatar, company, or timezone. A separate profile table is a common approach.

Create the Profiles Table

Create a profiles table containing fields such as: id display_name avatar_url created_at The profile ID can correspond to the authenticated user's ID.

Create a Profile After Signup

After a new account is created, your application can create the corresponding profile record.

Fetch the Profile

When the user opens their dashboard, query the profile associated with the current authenticated user.

Allow Profile Updates

Create an account settings page where the user can update permitted profile fields.

Protect the Data

Enable Row Level Security. A user should generally be able to read and update their own profile rather than every profile in the database.

Test Multiple Accounts

Create two users and verify that each account can only modify the intended profile. This combination of authentication and database permissions creates a much safer profile system.

Ready to deploy?

Launch your app on Hostwares — start for $1.00/mo with auto-scaling & global CDN.

Start for $1.00/mo

Ready to deploy? Start for $1.00/mo

Deploy now