Panel login
Kirby allows login with email and password and passwordless via a login code or to reset your password. These configurable login methods are different ways of getting into the Panel.
Available login methods
Kirby comes with three login methods. If you don't configure anything, login via password is the default. Passwordless login needs to be enabled explicitly.
The login methods are defined in the config.php
file. Learn more in the reference.
-
Password (
password
)
The user gets a login form with email and password fields. It is also possible to combine the password with a second factor or step (for example a code sent via email). -
Passwordless login (
code
)
Here, the login form only has an email field. Instead of logging in with the user's password, the user gets asked for a login code that is sent via email by default or can be generated by plugins. You might know this way of logging in from services like Notion or from our feedback site. -
Password reset (
password-reset
)
This method is very similar to the passwordless login, but the purpose is different: After logging in with the code, the user will be redirected to the password reset form. After confirming the new password, the user is redirected to the Panel dashboard.
Limiting how long a code is valid
You can customize how long generated login/password reset code is valid, see Code timeout.
Password reset
For the password reset feature there is a password reset form on its own dedicated page.
Second factor authentication (2FA)
Kirby supports 2FA via email codes, or one-time time-based codes (TOTP), see second factor authentication
Setting the sender and subject for login related emails
You can customize the sender email, sender name and subject of login related emails (login via code, password reset and 2FA via email), see Email options.
Customize email text
When you enable login via code or password reset, Kirby sends an email to the user. You can customize those standard email templates by placing the following email templates into /site/templates/emails/auth
:
Login via code
HTML template:
/site/templates/emails/auth/login.html.php
Text template:
/site/templates/emails/auth/login.php
Default email text:
Password reset
HTML template:
/site/templates/emails/auth/password-reset.html.php
Text template:
/site/templates/emails/auth/password-reset.php
Default email text:
Our default templates are translated into our Panel languages. Kirby will automatically pick the best language for the email text (the configured user language, the default panel.language
or the default site language of a multilang site). The panel.language
option is also used for the login UI.