Example: Supabase Auth, Quick Setup & Login

Quick start for Supabase Auth implementation…after setting up Supabase Auth plugin.

In Supabase, there are important settings in the active Auth Providers:

Disable “Confirm email” (in the email Auth Provider) if you want to create a user (in WeWeb’s Supabase Auth plugin interface) and then login as that user (e.g., to test access control policies while in development):

The default/‘starter’ login components in WeWeb are not fully functioning out of the box, even though they have a workflow attached.

WeWeb example components use Xano. Remove that workflow step and replace with the “Sign In” one for Supabase Auth (and add the form fields to the workflow action):

Tip: Build a simple “profile” page to ensure you are logged in as the intended user:

Hope it helps you build faster.

2 Likes

For assigning Roles, do we still need a separate table? i.e. User, Super User, Admin

If you plan on using roles elsewhere in your app, then yes.

This quick tutorial assumes you have already setup the Supabase Auth plugin, which is when you would typically do role table setup (see WeWeb docs here). Note: the docs are a bit behind–the current Auth plugin can do the role table setup for you.

Hey Dhew!

Thanks a lot for this tutorial!
Removing Supabase’s email validation is excellent to learn without facing some auth issues.

As for the example components, we do have ready-to-use components with supabase already working in the workflow.
Steps:
1- Install Supabase plugin + Supabase Auth Plugin
2- Click on Add
3- Click on Supabase Auth button in the left column
4- Any component you use here will have supabase already integrated.


1 Like

Hi Agustin,

Good point. I think when I started this new project I had selected to start with the simple CRUD template, which came with some basic pages. One of those prebuilt pages was a login page that had the Xano workflow.

So advice for Supabase users is to simply doublecheck any components you use to ensure they are using the Supabase workflow actions (and/or to just start with the Supabase Auth plugin components!).

Thanks

1 Like