Transcript
In this lesson, we are going to connect your application to your database for the user's table. We will configure authentication settings so users can sign up and set up user groups to develop personalized experiences for each group.
Let's start by going to users. You might notice that while you have test users in Softr, your database actually has many more. This is because we haven't synced our user database yet.
To sync the users table, click on the users area, then click on the users tab and select sync with data source. We will select Airtable and locate the specific inventory management demo base.
[.blog-callout]
While Airtable is a common choice, you can also use Softr Databases as your native data source. It is built directly into Softr for faster performance and easier management.
[.blog-callout]
Now we need to map the fields. Mapping ensures the email field Softr sees matches the email field in your database. We will map email to email, name to name, and the avatar field accurately.
Once set up, save and sync. The users from your database will be pulled into Softr. This establishes a real-time, two-way sync between your data source and your application.
Next, let's configure user groups. Within the user group tabs, there are two ways to create a group. You can create one manually, though we usually prefer a condition-based approach.
A condition-based approach is dynamic. Whenever a user meets a specific condition, they automatically join the group. If they no longer meet it, they are removed.
For example, we can create a warehouse manager group. We will set a condition where the role in your database must equal warehouse manager. We can do the same for a sales manager group.
Every Softr app includes two default user groups: logged in users and non-logged in users. You can use these to control which pages, like a landing page or a dashboard, are visible to visitors versus members.
[.blog-callout]
If you want to save time setting up these structures, you can use the AI co-builder. It can generate your entire application logic, including pages and user permissions, from a single prompt.
[.blog-callout]
Now let's move to the authentication tab. Here you can configure how users sign up or log in. Softr makes it easy to enable or disable these features based on your needs.
For the authentication method, we currently have email and password set. However, you can change this to a one-time code. This sends a secure link to the user's email for access.
I prefer the one-time code because users often forget passwords. As long as they have access to their email, they can always get into the application securely.
Regarding sign-ups, you have several options. For an internal business tool, you might not want open sign-ups. You can choose domain restricted sign-up instead.
With domain restriction, only users with a specific email domain, like softr.io, can create an account. This ensures only your employees can access the app without manual admin invites.
You can also fine-tune security by setting auto log out rules for inactivity. This is helpful if you are dealing with sensitive data and want to ensure sessions end after a period of idleness.
[.blog-callout]
Softr now offers Unlimited Published Apps on all plans. This means you can build and launch as many specialized tools as your business needs without worrying about plan limits.
[.blog-callout]
Softr automatically manages your system pages. If you disable login or sign-up features, the corresponding pages will automatically be hidden since they are no longer required.
Finally, let's look at visibility rules. On the dashboard page settings, we can set the visibility so that only logged in users can see the entire page.
You can also apply visibility rules to individual blocks. For example, a specific block can be set so that only the warehouse manager group can see it.
If a user is not in that group, the block remains invisible to them. This ensures that sensitive data is never even sent to the client-side for those unauthorized users.
You can preview your app as different users to test these roles. By selecting a specific user profile from your list, you can verify exactly what a sales manager or warehouse manager sees.
[.blog-callout]
Building a client portal or project management tool? These visibility rules are key to keeping your data organized and secure for different stakeholders.
[.blog-callout]
This setup allows you to create highly personalized interfaces. Now that your users are synced and your groups are ready, you can continue building out your application logic.



