Login and Logout
Klub provides login and logout endpoints that integrate with Kirby users while enforcing CSRF and rate limits. Use this page if you want classic email/password auth.
Login
POST /klub/login
Required fields:
emailpasswordtoken(CSRF)
Optional:
redirect(safe same-origin redirect)captcha/cf-turnstile-responseif configured
Notes:
- If the user has a boolean
blockedfield set totrue, the login is denied with a 403 response.
Logout
POST /klub/logout
Required fields:
token(CSRF)
Optional:
redirect
Example
<form method="post" action="<?= site()->url() ?>/klub/login">
<input type="email" name="email" required>
<input type="password" name="password" required>
<input type="hidden" name="token" value="<?= csrf() ?>">
<input type="hidden" name="redirect" value="<?= url('account') ?>">
<button type="submit">Sign in</button>
</form>