mirror of
https://github.com/typemill/typemill.git
synced 2025-08-06 06:07:31 +02:00
V2.1.0 Rename auth code to login verification code
This commit is contained in:
@@ -26,8 +26,8 @@ class ControllerWebAuth extends Controller
|
||||
$validation = new Validation();
|
||||
$securitylog = $this->settings['securitylog'] ?? false;
|
||||
$authcodeactive = $this->settings['authcode'] ?? false;
|
||||
$authtitle = Translations::translate('Auth code missing?');
|
||||
$authtext = Translations::translate('If you did not receive an email with an authentication code, then the username or password you entered was wrong. Please try again.');
|
||||
$authtitle = Translations::translate('Verification code missing?');
|
||||
$authtext = Translations::translate('If you did not receive an email with the verification code, then the username or password you entered was wrong. Please try again.');
|
||||
|
||||
if($validation->signin($input) !== true)
|
||||
{
|
||||
@@ -103,8 +103,8 @@ class ControllerWebAuth extends Controller
|
||||
|
||||
$mail = new SimpleMail($this->settings);
|
||||
|
||||
$subject = Translations::translate('Your authentication code for Typemill');
|
||||
$message = Translations::translate('Use the following authentication code to login into Typemill') . ': ' . $authcodevalue;
|
||||
$subject = Translations::translate('Your verification code for Typemill');
|
||||
$message = Translations::translate('Use the following verification code to login into Typemill') . ': ' . $authcodevalue;
|
||||
|
||||
$send = $mail->send($userdata['email'], $subject, $message);
|
||||
|
||||
@@ -113,7 +113,7 @@ class ControllerWebAuth extends Controller
|
||||
if(!$send)
|
||||
{
|
||||
$authtitle = Translations::translate('Error sending email');
|
||||
$authtext = Translations::translate('We could not send the email with the authentication code to your address. Reason: ') . $mail->error;
|
||||
$authtext = Translations::translate('We could not send the email with the verification code to your address. Reason: ') . $mail->error;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -169,10 +169,10 @@ class ControllerWebAuth extends Controller
|
||||
{
|
||||
if($securitylog)
|
||||
{
|
||||
\Typemill\Static\Helpers::addLogEntry('login: invalid authcode format');
|
||||
\Typemill\Static\Helpers::addLogEntry('login: invalid verification code format');
|
||||
}
|
||||
|
||||
$this->c->get('flash')->addMessage('error', Translations::translate('Invalid authcode format, please try again.'));
|
||||
$this->c->get('flash')->addMessage('error', Translations::translate('Invalid verification code format, please try again.'));
|
||||
|
||||
return $response->withHeader('Location', $this->routeParser->urlFor('auth.show'))->withStatus(302);
|
||||
}
|
||||
@@ -199,10 +199,10 @@ class ControllerWebAuth extends Controller
|
||||
{
|
||||
if($securitylog)
|
||||
{
|
||||
\Typemill\Static\Helpers::addLogEntry('login: authcode wrong or outdated.');
|
||||
\Typemill\Static\Helpers::addLogEntry('login: verification code wrong or outdated.');
|
||||
}
|
||||
|
||||
$this->c->get('flash')->addMessage('error', Translations::translate('The authcode was wrong or outdated, please start again.'));
|
||||
$this->c->get('flash')->addMessage('error', Translations::translate('The verification was wrong or outdated, please start again.'));
|
||||
|
||||
return $response->withHeader('Location', $this->routeParser->urlFor('auth.show'))->withStatus(302);
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{% extends 'layouts/layoutAuth.twig' %}
|
||||
|
||||
{% block title %}Login Authentication Code{% endblock %}
|
||||
{% block title %}Login Verification Code{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
<div class="lg:w-1/2 bg-teal-600 text-white min-h-screen flex justify-center items-center">
|
||||
<div class="max-w-md content-center">
|
||||
|
||||
<h1 class="text-4xl py-5">Authentication Code</h1>
|
||||
<h1 class="text-4xl py-5">Login Verification Code</h1>
|
||||
|
||||
<p>{{ translate('Enter the authentication code from your email:') }}</a>
|
||||
<p>{{ translate('Enter the verification code from your email:') }}</a>
|
||||
|
||||
<form method="POST" action="{{ url_for("auth.authcode") }}" autocomplete="off">
|
||||
|
||||
|
@@ -210,9 +210,9 @@ fieldsetsecurity:
|
||||
checkboxlabel: 'Track spam and suspicious actions in a logfile'
|
||||
authcode:
|
||||
type: checkbox
|
||||
label: 'Authentication code (recommended)'
|
||||
checkboxlabel: 'Send a 5-digit authentication code by email to confirm login.'
|
||||
description: 'Please test this with your account first. If you do not get an email, make sure you have ftp-access to the server to disable the feature in the settings.yaml manually. The authentication code will be valid for 5 minutes. Be aware that device fingerprints will be stored in the user accounts. Make sure this complies with privacy legislation in your country.'
|
||||
label: 'Login Verification (recommended)'
|
||||
checkboxlabel: 'Verify your login with a 5-digit code send by email.'
|
||||
description: 'Please test this with your account. If you do not get an email, make sure you have ftp-access to disable the feature in the settings.yaml manually. The verification code will be valid for 5 minutes. Be aware that device fingerprints will be stored in the user accounts. Make sure this complies with privacy legislation in your country.'
|
||||
authcaptcha:
|
||||
type: radio
|
||||
label: 'Use captcha in authentication forms'
|
||||
|
Reference in New Issue
Block a user