I created a module which does what you need and explained how it works in my blog post:
General idea is that your page template contains a
Rules field where you can set any conditions and actions you want.
Then there is a pipeline processors which runs:
var rules = RuleFactory.GetRules<PageRulesRuleContext>(rulesField);
if (rules == null || rules.Count == 0)
var ruleContext = new PageRulesRuleContext();
One of the actions I've created is
Redirect to another page action. Just use it together with
when user is anonymous condition.
Be aware that I haven't tested it with JSS so you may need to hook into some other pipeline, not the one I used.