Authentication protected pages


I’m trying to do a project built on VSF and using the Capybara theme as a starting point, but am running into an issue with a requirement that some pages should only be viewable when authenticated. I realise this gets a whole lot more complex than it seems at first glance, because of SSR and caching pages.

I came across an old issue / PR that seemed to indicate that this had been implemented in at least some fashion, but I’m not sure that functionality actually exists any more?

Ideally, I’d want to hook into something that prevents the page from rendering until I can resolve isLoggedIn (or some similar state) and meta data about the page/route, then redirect if the criteria doesn’t match (or let the render complete if it does.) Anyone have any idea how something like this might be possible?

Thanks in advance.

EDIT: In case it wasn’t completely clear, I’m not concerned about navigation between pages (standard navigation guards work fine for this) but the initial page load / render with the hydrated content.