feat(DB/Commands): detail the authenticator settings in the 2FA setup output (#27134)

This commit is contained in:
Stefano Borzì
2026-08-15 15:59:50 +02:00
committed by GitHub
parent 1e4d35bfce
commit a690a38996
3 changed files with 11 additions and 6 deletions
@@ -0,0 +1,7 @@
--
UPDATE `acore_string` SET
`content_default` = 'In order to complete setup, you\'ll need to set up the device you\'ll be using as your second factor.\nYour 2FA key: {}\nAdd the key to an authenticator app, such as the free and open source FreeOTP (https://freeotp.github.io/), with these settings:\n- Type: Time-based (TOTP)\n- Digits: 6\n- Algorithm: SHA1\n- Interval: 30 seconds\nOnce you have set up your device, confirm by running .account 2fa setup <token> with the generated token.',
`locale_deDE` = 'Um die Einrichtung abzuschließen, müsst Ihr das Gerät einrichten, das Ihr als zweiten Faktor verwenden werdet.\nEuer 2FA-Schlüssel: {}\nFügt den Schlüssel einer Authenticator-App hinzu, zum Beispiel dem freien und quelloffenen FreeOTP (https://freeotp.github.io/), mit diesen Einstellungen:\n- Typ: Zeitbasiert (TOTP)\n- Ziffern: 6\n- Algorithmus: SHA1\n- Intervall: 30 Sekunden\nSobald Ihr Euer Gerät eingerichtet habt, bestätigt dies mit .account 2fa setup <token> und dem generierten Token.',
`locale_esES` = 'Para completar la configuración, tendrás que configurar el dispositivo que utilizarás como segundo factor.\nSu clave 2FA: {}\nAñade la clave a una aplicación de autenticación, como FreeOTP, libre y de código abierto (https://freeotp.github.io/), con estos ajustes:\n- Tipo: Basado en tiempo (TOTP)\n- Dígitos: 6\n- Algoritmo: SHA1\n- Intervalo: 30 segundos\nUna vez que hayas configurado tu dispositivo, confirma ejecutando .account 2fa setup <token> con el token generado.',
`locale_esMX` = 'Para completar la configuración, tendrás que configurar el dispositivo que utilizarás como segundo factor.\nSu clave 2FA: {}\nAñade la clave a una aplicación de autenticación, como FreeOTP, libre y de código abierto (https://freeotp.github.io/), con estos ajustes:\n- Tipo: Basado en tiempo (TOTP)\n- Dígitos: 6\n- Algoritmo: SHA1\n- Intervalo: 30 segundos\nUna vez que hayas configurado tu dispositivo, confirma ejecutando .account 2fa setup <token> con el token generado.'
WHERE `entry` = 91;
@@ -0,0 +1,2 @@
--
UPDATE `command` SET `help` = 'Syntax: .account 2fa setup <token>\nSets up two-factor authentication for this account.\nRun .account 2fa setup 1 to get your 2FA key, then confirm with .account 2fa setup <token>.' WHERE `name` = 'account 2fa setup';
+2 -6
View File
@@ -107,11 +107,9 @@ public:
static bool HandleAccount2FASetupCommand(ChatHandler* handler, char const* args)
{
// no error message here: the framework then prints the command help, which explains how to get the key
if (!*args)
{
handler->SendErrorMessage(LANG_CMD_SYNTAX);
return false;
}
auto token = Acore::StringTo<uint32>(args);
@@ -177,11 +175,9 @@ public:
static bool HandleAccount2FARemoveCommand(ChatHandler* handler, char const* args)
{
// no error message here: the framework then prints the command help, which names the token argument
if (!*args)
{
handler->SendErrorMessage(LANG_CMD_SYNTAX);
return false;
}
auto token = Acore::StringTo<uint32>(args);