I have some pages that should only be able to be accessed by “logged in users”, however, if they know the url, they can still access them. How can I redirect them to the “index” page if they type the url in and ARE NOT logged in yet?
Seems like Bubble rookie level, but I’m tired and drawing a blank right now.
This way, if the User isn’t logged in, they’ll automatically be re-directed back to your app’s home page.
If you have a reusable element that is only used for logged-in users, and placed on the ‘logged-in pages’, you could instead place the redirect workflow inside that reusable element (instead of adding it individually to each ‘logged-in only’ page). That would also re-direct logged out users back to the home page in the same way. Either way works!
For extra security, you can set up privacy roles to ensure logged-out users won’t see any data that they aren’t supposed to see. You can also set the groups on the logged-in pages to not be visible on page load: