Disable '/panel/login' or redirect user from '/panel/login' to custom login page

I want unauthorized users (ant panel users, and not) to be redirected to the same /login page. If user opens /panel/login he should be redirected to /login page (which is overwritten now). Is it possible?

else, it is possible to disable /panel/login page at all?

i am actually looking for this very solution myself. any ideas @texnixe or @lukasbestle?
i tried custom routes but seems like the /panel/login page does not allow for changes like these…
:pray:t2: :sparkles:

You can replace the login view by overriding the login Panel area in a plugin. This example will redirect to /login, but you could also replace the view itself.

Kirby::plugin('your-name/login-override', [
  'areas' => [
    'login' => function () {
      return [
        'views' => [
          'login' => [
            'action' => function () {
              Panel::go(url('login'));
            }
          ]
        ]
      ];
    }
  ]
]);
1 Like

thank you so much! that helped a lot!!
:blossom: