# Initial Setup

To use authentication, you will need to complete the following initial setup:

1. [Creating a "users" table](/integrations/authentication/supabase/initial-setup.md#1-creating-a-users-table)
2. [Enabling authentication in FlutterFlow](/integrations/authentication/supabase/initial-setup.md#2-enabling-authentication-in-flutterflow)

Prerequisites

Before you begin, make sure you have completed the [**Supabase Setup**](/integrations/supabase/setup.md).

### 1. Creating a "users" table[​](/integrations/authentication/supabase/initial-setup.md#1-creating-a-users-table "Direct link to 1. Creating a \"users\" table")

To use Supabase authentication, you'll need to create a table to store your users' data, such as their name, email, and profile picture.

Also, it's recommended to create a [foreign key relationship](https://supabase.com/docs/guides/database/tables#joining-tables-with-foreign-keys) from the `id` column of your "users" table to the `id` column of the "users" table in auth (protected) schema, i.e., `auth.users.id` with `on delete cascade`. This ensures that when a user is deleted from the "auth.users" table, their corresponding data in your "users" table will also be removed.

Here's how you do it:

note

The "users" table in auth (protected) schema is a private table that Supabase uses to store auth-related sensitive information such as email, encrypted pass, and confirmation token. ![img.png](/assets/images/img-b181589c7111a788900a2fa263eafee3.png)

### 2. Enabling authentication in FlutterFlow[​](/integrations/authentication/supabase/initial-setup.md#2-enabling-authentication-in-flutterflow "Direct link to 2. Enabling authentication in FlutterFlow")

To enable authentication in FlutterFlow:

1. Open your FlutterFlow project.

2. Navigate to the Setting and Integrations () from the Navigation Menu > App Settings > Authentication.

3. Turn on the **Enable Authentication** toggle and select **Authentication Type** to **Supabase**.

4. To ensure that your users are directed to the appropriate pages based on their login status, you must set the [initial pages](/resources/projects/settings/general-settings.md#initial-page).

![img\_1.png](/assets/images/img_1-b7c8f0344e87b684233866df3d4144e5.png)
