Page Level Security

Has anyone managed to figure out how to handle page-level security? I have a page configured to redirect to a login page when “User is logged out”. However, the initial page partially loads before this action kicks in. So it works but this weird flash of the original page is not acceptable.

Any suggestions on how to resolve it?

1 Like

My approach to hide content would be:

Hide the main group on page load.

Add a conditional that element will be visible when user is logged in

Redirect logged out users to the login page

I agree with @jared.gibb – what I do on my app, is I hide everything until my data loads using a giant Group element painted the same color as the background. I use a spinner and verbiage to indicate that something is happening and when everything is loaded I hide the “hider” group.

That’s going to leave the user with a big white screen.

1 Like

What I do is…

  1. Have a When workflow to redirect to another page if the user is not logged in
  2. Everything on the page is within a main group with “visible on page load” unchecked. I use a condition to make the group visible if the user is logged in.

If a non logged in user hits the page, it will quickly redirect, and if they see anything it will be a blank screen. Also the top menu is dynamic so that a non-logged in user won’t see links that require a login.

Beyond that, you still need to put privacy rules on your data and also conditions on any workflows that write to the database, per Bubble’s manual.

5 Likes

This is what I’ve done so far but it is not a good user experience. It still loads a blank page before redirecting. This type of functionality needs to happen on the server level somehow, meaning for it to not to load the page and redirect under some conditions. I wonder if this could be done with a plugin?

2 Likes