Restricting App to Logged in users only

Hello, I am trying to set my bubble site to only be access when a user is logged in.

The index page is my login page. I have a workflow setup on my header (which is used on all other pages except the index) so that on page load, if the user is not logged in, it will redirect them to the index page to log in.

This is working as expected but the problem is this only happens on the page load. Meaning info of the page will load before the user is redirected. According to my testing this can be instant and at times i have seen loading times of 2-4 seconds before they are redirected. Exposing information on the screen. I do have the data tables protected for different groups of users ( example, basic user. manager, supervisor etc) but i dont want them to see ANYTHING before logging in.

Is this possible or do i need to deal with the redirect after page load?

Thanks!!!

I may be over simplifying but can you not put everything into a main ā€˜groupā€™ on each page and take off ā€˜visible on page loadā€™ then have a conditional statement that says ā€˜if user logged in, group is visibleā€™? That way nothing will load if the user isnā€™t logged in I think?

Have you tried adding a ā€œUser is logged outā€ condition to the page? That should close the gap.

user-logged-out

12 Likes

Thanks Dan. this seems to be working much faster than doing it while page loaded. Awesome stuff!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.