mirror of
https://github.com/itflow-org/itflow
synced 2026-12-02 00:59:03 +00:00
Passkeys: agents and client portal contacts can add a passkey with their password and sign in with it instead of their email and password, counting as two-step sign-in; a passkey that supports PRF also opens an agent's credential vault, otherwise credentials stay locked until they type their password once; admins can turn passkeys off in Security settings, and resetting MFA, turning off a contact's two-step sign-in, archiving an agent and the incident password reset remove them; database 4.2.2 adds user_passkeys, users.user_passkey_handle and settings.config_login_passkeys, and lbuchs/WebAuthn 2.2.0 is bundled in libs/webauthn
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
* Admin > Settings > Security - the sign-in page (its message, and a login
|
||||
* key agents need in its address), how long two-step sign-in remembers a
|
||||
* device, when admins hear of failed sign-ins, whether the API takes a key in
|
||||
* the address, and shared links. Saved by
|
||||
* device, whether passkeys sign people in, when admins hear of failed sign-ins,
|
||||
* whether the API takes a key in the address, and shared links. Saved by
|
||||
* edit_security_settings (admin/post/settings_security.php).
|
||||
*/
|
||||
|
||||
@@ -13,6 +13,10 @@ require_once "includes/inc_all_admin.php";
|
||||
// Read here rather than with every page's settings, so a page still opens before the update that adds it
|
||||
$config_login_alert_failures = signInAlertLimit();
|
||||
$config_api_key_in_address = apiKeyInAddressAccepted() ? 1 : 0;
|
||||
// Passkeys, once the database has them (functions/passkey.php)
|
||||
$passkeys_ready = passkeysReady();
|
||||
$config_login_passkeys = passkeysOn() ? 1 : 0;
|
||||
$passkey_address = passkeyRp()['address'];
|
||||
|
||||
$login_url = rtrim('https://' . preg_replace('#^https?://#', '', (string) $config_base_url), '/') . '/login.php?key=';
|
||||
$login_key_shown = (string) settingsValue('config_login_key_secret', $config_login_key_secret);
|
||||
@@ -44,6 +48,12 @@ echo settingsPageStart('security');
|
||||
'suffix' => 'days', 'help' => 'Each agent can see and forget their remembered browsers in their own Security settings.']) ?>
|
||||
<?= settingsSectionEnd() ?>
|
||||
|
||||
<?php if ($passkeys_ready) { ?>
|
||||
<?= settingsSectionStart('passkeys', 'Passkeys', 'A passkey signs an agent or a client contact in with their fingerprint, face or PIN instead of their password, and counts as two-step sign-in. Each adds their own from their account, with their password. Passkeys are made for ' . escapeHtml($passkey_address) . ' - moving ITFlow to another address means adding them again.') ?>
|
||||
<?= settingsSwitch('config_login_passkeys', $config_login_passkeys, ['help' => 'Off, passkeys already added are kept, but don\'t sign anyone in until it is on again.']) ?>
|
||||
<?= settingsSectionEnd() ?>
|
||||
<?php } ?>
|
||||
|
||||
<?= settingsSectionStart('failed', 'Failed sign-ins', 'Counted over ' . SIGN_IN_WINDOW_MINUTES . ' minutes, from one address or against one account. An address is turned away after ' . SIGN_IN_LOCKOUT . ', whatever is set here.') ?>
|
||||
<?= settingsSelect('config_login_alert_failures', intval($config_login_alert_failures), signInAlertOptions(), ['icon' => 'fa-bell',
|
||||
'help' => 'Each admin gets a notification and an email.']) ?>
|
||||
|
||||
Reference in New Issue
Block a user