Magic Link Login

Klub integrates with Kirby’s magic-link auth challenge. Use this page if you want passwordless login for members. Enable it in Kirby’s auth config before using these endpoints.

Ensure auth.methods includes magic-link in your Kirby configuration.

POST /klub/magic-link sends a login link to the email if the user exists.

POST /klub/signup sends a login link and allows account creation on confirmation.

Required fields:

  • email
  • token (CSRF)

Optional:

  • redirect (where to go after confirmation)
  • success_url (alternate name used by the magic link generator)
  • name (used when creating a new user via signup)

GET /klub/magic-link is triggered by the email link. Klub validates the token, logs in the user, and redirects safely.

Example

<form method="post" action="<?= site()->url() ?>/klub/magic-link">
  <input type="email" name="email" required>
  <input type="hidden" name="token" value="<?= csrf() ?>">
  <input type="hidden" name="redirect" value="<?= url('account') ?>">
  <button type="submit">Send magic link</button>
</form>
Kirby Klub is not affiliated with the developers of Kirby CMS. We are merely standing on the shoulder of giants.
© 2026 Bruno Meilick All rights reserved.