Nextbase Docs
Nextbase Docs
HomeBlogWelcome to Nextbase v3!Getting Started with NextBaseQuick setup
Admin Panel GuideAsynchronous Data Fetching GuideAuthenticationCreating Admin Panel PageCreating Docs PageCreating in-app notificationsCreating a new Supabase tableCreating a Protected PageCreating Public Dynamic PageCreating Public Static PageHandling Realtime Data With SupabaseManaging UsersMutating Data With SupabaseOptimizing Data Operations in Next.js 14 and SupabaseRemoving InternationalizationRow Level SecurityStripe Setup in Nextbase UltimateWriting Integration Tests with PlaywrightWriting Unit Tests with Vitest
Guides

Managing Users

Learn how to manage users with Supabase

Users are the core of your application. Supabase Auth provides a complete user management system, including sign up, sign in, email verification, password recovery, and more.

How does Supabase store user data?

Supabase stores user data in a table called auth.users. auth is an internal schema that is created when you initialize Supabase.

  • When new users sign up, they are added to this table.
  • This table and tables related in the auth schema are automatically updated when users update their login information

Storing more information about users

  • However this table doesn't contain any more data other than email and identifying information. Since we want to store more information about our users, we use a table called user_profiles.
  • user_profiles is a table which allows users to update their public information such as name and avatar. (avatar image is stored in supabase storage and the url is stored here).
  • Users can also store their private preferences in the user_private_info table. This table is only accessible by the user whose id matches the `user_id` column. Both the tables mentioned above have auth.users.id as a foreign key.
  • Hence if you want to add more public information about your users, you can add a new column to `user_profiles` and if you want to add more private information, you can add a new column to `user_private_info`.

Handling Realtime Data With Supabase

Learn how to handle realtime data in Supabase using server actions and react query

Mutating Data With Supabase

Learn how to mutate data asynchronously in Supabase using server actions and react query

On this page

How does Supabase store user data?Storing more information about users