Supabase Authentication: Do I need to Setup Success/Error Code Boolean variables for everything?

Hello,

I couldn’t find this on any documentation or videos so asking here in case. When setting up the Auth pages for Supabase (i.e Sign-Up, Log-In, Reset Password) and I want to add in a success and error message - do the Supabase Auth Templates already come in with pre-defined messages? I know on some of the videos we can set up boolean variables to trigger messages. But I noticed when setting up those Supabase Auth templates, I noticed there was already a ‘hidden’ message text box that came with a formula assigned ‘text’ & ‘display’. See below for what I’m referring to:

However, I’m not sure if that’s just the shell and I need to set up actual error/success texts. The videos you showed seemed to recommend boolean variables but I wanted to avoid setting up so many variables for 1 form alone (and have to set up different variables and text boxes with conditional viewing).

As an example - the SignUp form, I want to display several different errors that are quite common among websites:

Sign Up Page:

  1. User/Email already registered
  2. Password too short

Does the preloaded Message element that comes with each Supabase Auth Page will load the appropriate error? Or is that meant for me to use & customize (i.e add conditional formatting depending on the boolean variable & as well as add workflow for the error & sucess)

Hope that was clear.

Thank you!

It’s using an “Unknown” variable. While implementing of bootstrap-like error handling for forms is a waste of time, I’ve imported a toastr js library and set it as a handler for error message in an auth workflow.

You probably need to setup it yourself, check the content of the bound formula.

I don’t think you need many variable, you can probably have one variable containing the error message and update this variable on signup/login (to insert “Bad credentials” for exemple) and display the message if the variable contain something

1 Like