Skip to content

Commit

Permalink
Clarify instructions for authentication app usage and link to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Moc committed Jan 24, 2021
1 parent 41ec838 commit b0e8bd9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion languages/English/English_front.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


// Setup
define("LAN_2FA_ENABLE_INSTRUCTIONS1", "To set up Two Factor Authenthication for your account, please scan the below QR code or enter the secret key manually in your authenticator app on your device.");
define("LAN_2FA_ENABLE_INSTRUCTIONS1", "To set up Two Factor Authenthication for your account, please use the [authenticator app] on your device to scan the QR code below or to enter the secret key manually."); // Do not remove the brackets [...] - they are used for links
define("LAN_2FA_ENABLE_INSTRUCTIONS2", "To confirm your authenticator app is returning the correct 6-digit code, please verify the code by entering it below. After verification, Two Factor Authentication is setup for your account.");

define("LAN_2FA_DISABLE_INSTRUCTIONS", "To [b]disable[/b] Two Factor Authenthication for your account, please enter your 6-digit code to verify.");
Expand Down
8 changes: 7 additions & 1 deletion setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@
$label = SITENAME;
}

e107::getMessage()->addInfo(e107::getParser()->toHTML(LAN_2FA_ENABLE_INSTRUCTIONS1, true));
$instructions1 = str_replace(
array("[", "]"),
array("<strong><a href='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/e107inc/twofactorauth#recommended-authenticator-applications' target='_blank'>", "</a></strong>"),
LAN_2FA_ENABLE_INSTRUCTIONS1
);

e107::getMessage()->addInfo($instructions1);

$text .= '<img class="center-block" src="' . $tfa_library->getQRCodeImageAsDataUri($label, $secret) . '"><br>';
$text .= '<p class="text-center font-italic">'.chunk_split($secret, 4, ' ').'</p>';
Expand Down

0 comments on commit b0e8bd9

Please sign in to comment.