diff --git a/app/pages/credentials.php b/app/pages/credentials.php index 48498c3..c90d0d8 100644 --- a/app/pages/credentials.php +++ b/app/pages/credentials.php @@ -23,8 +23,11 @@ $item = $_REQUEST['item'] ?? ''; // if a form is submitted if ($_SERVER['REQUEST_METHOD'] == 'POST') { + // Ensure security helper is available + require_once '../app/helpers/security.php'; + $security = SecurityHelper::getInstance(); + // Validate CSRF token - $security->verifyCsrfToken($_POST['csrf_token'] ?? ''); if (!$security->verifyCsrfToken($_POST['csrf_token'] ?? '')) { Feedback::flash('ERROR', 'DEFAULT', 'Invalid security token. Please try again.'); header("Location: $app_root?page=credentials"); diff --git a/app/templates/credentials-2fa-setup.php b/app/templates/credentials-2fa-setup.php index 615314b..6f5eb91 100644 --- a/app/templates/credentials-2fa-setup.php +++ b/app/templates/credentials-2fa-setup.php @@ -4,94 +4,88 @@ */ ?> -
Two-factor authentication adds an extra layer of security to your account. Once enabled, you'll need to enter both your password and a code from your authenticator app when signing in.
+Security
+Protect your account with an extra verification step whenever you sign in.
+Use any TOTP-compatible app such as Google Authenticator, Microsoft Authenticator, or Authy.
+Open your authenticator app and scan the QR code below.
+
If you haven't already, install an authenticator app on your mobile device:
-Open your authenticator app and scan this QR code:
- -
- Enter the 6-digit code from your authenticator app to verify the setup:
- - - -- Important: Save these backup codes in a secure place. - If you lose access to your authenticator app, you can use these codes to sign in. - Each code can only be used once. -
-
-
- Enter the 6-digit code shown in your authenticator app.
+ ++ Save these codes somewhere secure. Each code can be used once if you lose access to your authenticator app. +
+
+
+ Security check
+Enter the 6-digit code from your authenticator app to continue.
+Enter the 6-digit code from your authenticator app:
- - - -
- Lost access to your authenticator app?
-
- Use a backup code
-
-
Lost access to your authenticator app?
+ +Security
+Update your password and keep two-factor authentication status in one place.
+Choose a strong password to keep your account safe.
Strengthen security with a verification code from your authenticator app.
+Two-factor authentication adds an extra layer of security to your account. Once enabled, you'll need to enter both your password and a code from your authenticator app when signing in.
- - -