I’ve password protected a page following the Authentification tutorial in the docs. It basically works fine but if I login to the panel (via the panel login screen) and then refresh the page chrome gives me ERR_TOO_MANY_REDIRECTS
how come? there’s just one single redirect at the top of my template:
after several attempts to solve this and after a clean install of kirby I’m still not able to get this to work. And even if it’s working in chrome, in safari it doesn’t.
don’t want to blame it on the software but did anything related to users/redirects/controllers happen in 2.1 that I’m not aware of?
maybe I’ve just found the error. the redirect snippet needs to point to the login page, not home.
<?php if(!$site->user()) go('/login') ?>
instead of
<?php if(!$site->user()) go('/') ?>
which makes sense in a way. Otherwise the controller and the snippet are endlessly redirecting to each other which is detected and interrupted by the browser.