I want to create a Login Page

Hello,

is there a way to create a login page ?
I mean giving access to the app to specific users with an email& an Password ?

Regards.

Hi Juli-b070, the login page is controlled by Honeycode and helps you share apps with users who have access to Honeycode. You wont need to create your login page. Any reason why you would want to? Can you please elaborate more?
Thanks!

@Juli-b070

If you want to control access to certain screens, you have a few options.

1

Create duplicate apps, one app for each type of user (eg. Admins, Editors, Contributors). Then, only share each app with your chosen people. This is pretty straightforward, but can be tricky to maintain the same UI and logic in multiple places.

2

Users table, custom navigation, and visibility rules. Admittedly, his is a little hacky, but it works.

  1. Build a table called "users", add every user for the app to it. The first column is formatted as a contact. Add each person to the table.
  2. In the users table, add a column for each screen you want to control access to. For each user row, and column, enter TRUE if you want them to have access.
  3. Remove all the screens you want to control access to from the main navigation. It may make sense to just not put any screen in the main navigation.
  4. On your home screen, create a new navigation bar. Add new blocks that will navigate the user to each of these screens.
  5. On each of those blocks, use the visibility rules to control if ther person using the app gets to see this link. Compare the value returned by $[sys_user] to rows in the "users" table, then check to see if there's a TRUE in the corresponding column. The formula might look like:
    =IF(findrow(users, "users[contact]=%", $[sys_user])[screen1]=TRUE, TRUE, FALSE)

You can expand this method further by building out things like user groups, and then assigning different permissions by group. You can also use the Users table and the visibility rules to just turn on and off pieces of a screen, which is what I do most often. A lot of times, I just need to hide the "edit" button for some people, or I just want to hide one column from a list. The users table and visibility rules can get you there.

3 Likes

Hi Andrew, I think it may be better to use email address instead of name. I tested with 2 users that have same name but different email addresses. It does not differentiate by email address, which you can imagine it would be a security issue. I think it is better to compare against $[sys_user][email]. Do you think so?

Hello Andrew,

We are creating a app using Honeycode and we want to create a login page for the users.
I am not understanding clearly what you are saying in option 2. I want to connect with you on this personally through meet so that I can get help from you. Can you tell me when you will be available?

This topic was automatically closed after 21 hours. New replies are no longer allowed.