Knack provides user authentication features so you can build apps that require your users to log in.
What is User Authentication
By default any Knack app can be viewed by anyone that knows the URL. For example, anyone can use this link to view the example business directory from Knack.
Adding user authentication means that a user must first log in before they can view your app. This is what the Customer Portal app would look like if user authentication was added:
Adding users to your app is easy. Open the app menu from the top left corner of your builder and select User Logins:
Click the user logins menu item and then the activate users link to enable user features:
You will have the option to choose which type of login you want to use with your app.
Knack Tip Most apps require multiple User Roles such as Employees and Supervisors or Teachers and Students. If you want to limit each role to have access to their own page, your app will require logins for different pages, the option highlighted below:
Accounts and User Roles
When you turn on user authentication, a special accounts object is placed in your database. The accounts records represent all the user accounts that can log in to your app regardless of their role.
Click “+ADD” next to user roles to create additional user roles:
A name, email, and password field is required for every user record.
Click here for more on managing user records.
The Accounts Object
You can add fields and connections to the Accounts object like any other object in your database.
This object will automatically capture the information from the following fields in all user role objects:
- User Roles
- User Status
Note If other fields are added to a user role object, their information will not be automatically captured in the Accounts object. For example, if you have a Manager user role with a field capturing the manger's department, that department information won't show up in the Accounts object.