Login Portal from Retool Database

Hello,

I would like to setup a member login portal in a Retool app. Ideally in the end, I'll have a mobile-friendly app alongside an admin panel that can be accessed via desktop (mobile admin is icing on the cake).

Simplified, I am using three tables in a "Retool Database":

  • people (first name, last name, email, phone, about me, etc.)
  • events (event title, start, end, location, description)
  • login_data (user, password, link to _people)

I'm looking to create a Login Portal as a gate to my app that does three things:

  1. Refer the login_data (user, password) to sign-in people (relation data) through a sign-in/sign-up container—>where they will land on a "My Account Info" page upon successful sign-in...all data referenced from the people table, and editable upon sign-in.
  2. Upon member sign-in, display an events page that show available, upcoming events—only when someone is signed in—based on (relation data in people table) member's event access privileges.
  3. Allow signed-in members the ability to RSVP to attend events that display in the events page.

My Retool Experience
I'm brand new to Retool. I have very little experience with traditional databases. I have been executing this exact use-case in Airtable via shared views, buttons and forms. I'm testing the security, scalability and robustness of Retool to see if I could build something that is more UX friendly.

I have tried setting up a Postgres database (unsuccessfully), as well as pulling in Airtable Data from REST API (successful, but too slow and not able to query what I need). It seems that Retool Database can support this use case, but I need some help.

I'm new to SQL, but am learning fast. I do not understand the triggers/actions on the buttons in the Retool canvas. Not sure if I should...

  • Set button action to "Go to app" (how would that then SELECT only the data for the signed-in user?)
  • Make the Sign-in canvas disappear upon successful sign-in, then show the queried data according to who's signed-in.
  • etc.

I cannot seem to find tutorials on how to setup anything like this on Youtube, Discord, etc. I'll learn best from a tutorial, but I'm happy to start a dialog—especially if it will help community members learn too!

Thanks in advance to any supporters!

Hi @simpletech

Thanks for reaching out!

As far as a true authentication system, it might be worth looking into a resource that has configurable auth options, such as a rest api. Unless you're using a public app that anyone with the link can access, all users accessing your app will also already be authenticated through Retool's log in system. Since they're authenticated, you can use the current_user object to dynamically identify who is viewing an app.

Set button action to "Go to app" (how would that then SELECT only the data for the signed-in user?)

  • You could have a url param that passes the current user information to the newly opened app & then filter all of your app queries for that user

Make the Sign-in canvas disappear upon successful sign-in, then show the queried data according to who's signed-in.

  • You could make the button's hidden field dependent on whether the auth query has successfully returned data: