Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Framework: Redirect to Login page if logged out
When you hit a valid route as a logged-out user, we should send you to the login page with a redirect back to the page you were trying to access. This is how all wp-admin links in core WP works. There have been fixes for individual pages (eg #24687 ) but this should be handled at the framework level. We have an email campaign using the Simple Payments Guided Tour #24627 and it freezes at a blank screen for a logged-out user. What this change does is to do a redirect for a valid section with the `enableLoggedOut` property set to true to the login screen with a redirect. A future PR could probably remove all bespoke uses of `import { redirectLoggedOut } from 'controller'` as well since this should supersede it.
- Loading branch information