Currently I am implementing the latter using a workflow on my reusable header component - when the page is loaded, it navigates to a “login required” page.
However this has the pretty fundamental flaw that briefly - before you are redirected - you can see a flash of all the content on the page.
Is there some better way to do it that means the page is never loaded?
Instead of waiting for when the page is loaded as used in the workflow above, I’ve done the following:
Choose General > Do when condition is true
For action, choose Navigation > Go to page…
Finally, just select the destination of the page you want to redirect to (ex: index)
@mmcconna Just a side-note, instead of changing the title to “SOLVED”, you can just click the solved button at the bottom of the post that solved your question which you can reveal with the “…” icon, like below. This way, it shows the most helpful post at the top of this thread.
Both of the above answers will wait for the page to load to trigger the redirect. The correct way to do this is triggering an event off General…User is logged out.
Very important from a security point of view. Until now I had only seen recommendation based on “Page is loaded”, which isn’t as secure as this one based on “User is logged out” because it doesn’t wait any page part to be loaded.