Skip to main content

Initial Setup

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

  1. Creating a "users" table
  2. Enabling authentication in FlutterFlow
Prerequisites

Before you begin, make sure you have completed the Supabase Setup.

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 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

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.

img_1.png