Skip to content

Commit cb3599e

Browse files
committed
feat: copy secret to register otp #551
1 parent 745e98d commit cb3599e

File tree

12 files changed

+455
-387
lines changed

12 files changed

+455
-387
lines changed

api/user/otp.go

Lines changed: 206 additions & 223 deletions
Large diffs are not rendered by default.

app/src/language/en/app.po

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ msgstr ""
1313
msgid "2FA"
1414
msgstr ""
1515

16-
#: src/views/preference/components/TOTP.vue:88
16+
#: src/views/preference/components/TOTP.vue:90
1717
msgid "2FA Settings"
1818
msgstr ""
1919

@@ -259,6 +259,10 @@ msgstr ""
259259
msgid "CADir"
260260
msgstr ""
261261

262+
#: src/views/preference/components/TOTP.vue:150
263+
msgid "Can't scan? Use text key binding"
264+
msgstr ""
265+
262266
#: src/components/ChatGPT/ChatGPT.vue:252
263267
#: src/components/StdDesign/StdDataDisplay/StdBatchEdit.vue:55
264268
#: src/components/StdDesign/StdDataDisplay/StdCurd.vue:253
@@ -452,11 +456,11 @@ msgstr ""
452456
msgid "Credentials"
453457
msgstr ""
454458

455-
#: src/views/preference/components/TOTP.vue:96
459+
#: src/views/preference/components/TOTP.vue:98
456460
msgid "Current account is enabled 2FA."
457461
msgstr ""
458462

459-
#: src/views/preference/components/TOTP.vue:93
463+
#: src/views/preference/components/TOTP.vue:95
460464
msgid "Current account is not enabled 2FA."
461465
msgstr ""
462466

@@ -753,12 +757,12 @@ msgstr ""
753757
msgid "Enable %{conf_name} in %{node_name} successfully"
754758
msgstr ""
755759

756-
#: src/views/preference/components/TOTP.vue:122
760+
#: src/views/preference/components/TOTP.vue:124
757761
#, fuzzy
758762
msgid "Enable 2FA"
759763
msgstr "Enabled"
760764

761-
#: src/views/preference/components/TOTP.vue:52
765+
#: src/views/preference/components/TOTP.vue:54
762766
#, fuzzy
763767
msgid "Enable 2FA successfully"
764768
msgstr "Enabled successfully"
@@ -976,7 +980,7 @@ msgid ""
976980
"ban threshold minutes, the ip will be banned for a period of time."
977981
msgstr ""
978982

979-
#: src/views/preference/components/TOTP.vue:108
983+
#: src/views/preference/components/TOTP.vue:110
980984
msgid ""
981985
"If you lose your mobile phone, you can use the recovery code to reset your "
982986
"2FA."
@@ -1013,12 +1017,12 @@ msgstr ""
10131017
msgid "Initialing core upgrader"
10141018
msgstr ""
10151019

1016-
#: src/views/preference/components/TOTP.vue:144
1020+
#: src/views/preference/components/TOTP.vue:157
10171021
msgid "Input the code from the app:"
10181022
msgstr ""
10191023

10201024
#: src/components/OTP/OTPAuthorization.vue:49
1021-
#: src/views/preference/components/TOTP.vue:157
1025+
#: src/views/preference/components/TOTP.vue:170
10221026
msgid "Input the recovery code:"
10231027
msgstr ""
10241028

@@ -1631,15 +1635,15 @@ msgid "Recovered Successfully"
16311635
msgstr "Saved successfully"
16321636

16331637
#: src/components/OTP/OTPAuthorization.vue:56
1634-
#: src/views/preference/components/TOTP.vue:164
1638+
#: src/views/preference/components/TOTP.vue:177
16351639
msgid "Recovery"
16361640
msgstr ""
16371641

1638-
#: src/views/preference/components/TOTP.vue:101
1642+
#: src/views/preference/components/TOTP.vue:103
16391643
msgid "Recovery Code"
16401644
msgstr ""
16411645

1642-
#: src/views/preference/components/TOTP.vue:110
1646+
#: src/views/preference/components/TOTP.vue:112
16431647
msgid "Recovery Code:"
16441648
msgstr ""
16451649

@@ -1779,7 +1783,7 @@ msgstr ""
17791783
msgid "Reset"
17801784
msgstr ""
17811785

1782-
#: src/views/preference/components/TOTP.vue:130
1786+
#: src/views/preference/components/TOTP.vue:132
17831787
msgid "Reset 2FA"
17841788
msgstr ""
17851789

@@ -1832,14 +1836,18 @@ msgstr "Saved successfully"
18321836
msgid "Saved successfully"
18331837
msgstr "Saved successfully"
18341838

1835-
#: src/views/preference/components/TOTP.vue:91
1839+
#: src/views/preference/components/TOTP.vue:93
18361840
msgid "Scan the QR code with your mobile phone to add the account to the app."
18371841
msgstr ""
18381842

18391843
#: src/views/certificate/DNSChallenge.vue:89
18401844
msgid "SDK"
18411845
msgstr ""
18421846

1847+
#: src/views/preference/components/TOTP.vue:149
1848+
msgid "Secret has been copied"
1849+
msgstr ""
1850+
18431851
#: src/components/StdDesign/StdDataEntry/components/StdSelector.vue:155
18441852
msgid "Selector"
18451853
msgstr ""
@@ -1862,8 +1870,8 @@ msgstr "Send"
18621870
#: src/views/environment/BatchUpgrader.vue:57
18631871
#: src/views/environment/Environment.vue:15 src/views/other/Install.vue:68
18641872
#: src/views/preference/AuthSettings.vue:49
1865-
#: src/views/preference/components/TOTP.vue:42
1866-
#: src/views/preference/components/TOTP.vue:55
1873+
#: src/views/preference/components/TOTP.vue:44
1874+
#: src/views/preference/components/TOTP.vue:57
18671875
#: src/views/preference/Preference.vue:83 src/views/stream/StreamList.vue:113
18681876
#: src/views/stream/StreamList.vue:81 src/views/system/Upgrade.vue:42
18691877
msgid "Server error"
@@ -2112,7 +2120,7 @@ msgstr "Certificate Status"
21122120
msgid "The path exists, but the file is not a private key"
21132121
msgstr ""
21142122

2115-
#: src/views/preference/components/TOTP.vue:109
2123+
#: src/views/preference/components/TOTP.vue:111
21162124
msgid ""
21172125
"The recovery code is only displayed once, please save it in a safe place."
21182126
msgstr ""
@@ -2185,7 +2193,7 @@ msgstr ""
21852193
msgid "Title"
21862194
msgstr ""
21872195

2188-
#: src/views/preference/components/TOTP.vue:90
2196+
#: src/views/preference/components/TOTP.vue:92
21892197
msgid ""
21902198
"To enable it, you need to install the Google or Microsoft Authenticator app "
21912199
"on your mobile phone."
@@ -2207,7 +2215,7 @@ msgstr ""
22072215
msgid "Too many login failed attempts, please try again later"
22082216
msgstr ""
22092217

2210-
#: src/views/preference/components/TOTP.vue:89
2218+
#: src/views/preference/components/TOTP.vue:91
22112219
msgid ""
22122220
"TOTP is a two-factor authentication method that uses a time-based one-time "
22132221
"password algorithm."

app/src/language/es/app.po

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ msgstr ""
2020
msgid "2FA"
2121
msgstr "2FA"
2222

23-
#: src/views/preference/components/TOTP.vue:88
23+
#: src/views/preference/components/TOTP.vue:90
2424
msgid "2FA Settings"
2525
msgstr "Configuración de 2FA"
2626

@@ -249,6 +249,10 @@ msgstr "Dir CA"
249249
msgid "CADir"
250250
msgstr "Directorio CA"
251251

252+
#: src/views/preference/components/TOTP.vue:150
253+
msgid "Can't scan? Use text key binding"
254+
msgstr ""
255+
252256
#: src/components/ChatGPT/ChatGPT.vue:252
253257
#: src/components/StdDesign/StdDataDisplay/StdBatchEdit.vue:55
254258
#: src/components/StdDesign/StdDataDisplay/StdCurd.vue:253
@@ -428,12 +432,12 @@ msgstr "Credencial"
428432
msgid "Credentials"
429433
msgstr "Credenciales"
430434

431-
#: src/views/preference/components/TOTP.vue:96
435+
#: src/views/preference/components/TOTP.vue:98
432436
msgid "Current account is enabled 2FA."
433437
msgstr ""
434438
"La cuenta actual tiene habilitada la autenticación de dos factores (2FA)."
435439

436-
#: src/views/preference/components/TOTP.vue:93
440+
#: src/views/preference/components/TOTP.vue:95
437441
msgid "Current account is not enabled 2FA."
438442
msgstr ""
439443
"La cuenta actual no tiene habilitada la autenticación de dos factores (2FA)."
@@ -716,11 +720,11 @@ msgstr "Falló el habilitado de %{conf_name} en %{node_name}"
716720
msgid "Enable %{conf_name} in %{node_name} successfully"
717721
msgstr "Habilitado exitoso de %{conf_name} en %{node_name}"
718722

719-
#: src/views/preference/components/TOTP.vue:122
723+
#: src/views/preference/components/TOTP.vue:124
720724
msgid "Enable 2FA"
721725
msgstr "Habilitar 2FA"
722726

723-
#: src/views/preference/components/TOTP.vue:52
727+
#: src/views/preference/components/TOTP.vue:54
724728
msgid "Enable 2FA successfully"
725729
msgstr "Habilitar 2FA exitoso"
726730

@@ -932,7 +936,7 @@ msgstr ""
932936
"el máximo de intentos en los minutos del umbral de prohibición, la IP será "
933937
"bloqueada por un período de tiempo."
934938

935-
#: src/views/preference/components/TOTP.vue:108
939+
#: src/views/preference/components/TOTP.vue:110
936940
msgid ""
937941
"If you lose your mobile phone, you can use the recovery code to reset your "
938942
"2FA."
@@ -972,12 +976,12 @@ msgstr "Error de actualización de kernel inicial"
972976
msgid "Initialing core upgrader"
973977
msgstr "Inicializando la actualización del kernel"
974978

975-
#: src/views/preference/components/TOTP.vue:144
979+
#: src/views/preference/components/TOTP.vue:157
976980
msgid "Input the code from the app:"
977981
msgstr "Ingrese el código de la aplicación:"
978982

979983
#: src/components/OTP/OTPAuthorization.vue:49
980-
#: src/views/preference/components/TOTP.vue:157
984+
#: src/views/preference/components/TOTP.vue:170
981985
msgid "Input the recovery code:"
982986
msgstr "Ingrese el código de recuperación:"
983987

@@ -1575,15 +1579,15 @@ msgid "Recovered Successfully"
15751579
msgstr "Recuperado con éxito"
15761580

15771581
#: src/components/OTP/OTPAuthorization.vue:56
1578-
#: src/views/preference/components/TOTP.vue:164
1582+
#: src/views/preference/components/TOTP.vue:177
15791583
msgid "Recovery"
15801584
msgstr "Recuperación"
15811585

1582-
#: src/views/preference/components/TOTP.vue:101
1586+
#: src/views/preference/components/TOTP.vue:103
15831587
msgid "Recovery Code"
15841588
msgstr "Código de Recuperación"
15851589

1586-
#: src/views/preference/components/TOTP.vue:110
1590+
#: src/views/preference/components/TOTP.vue:112
15871591
msgid "Recovery Code:"
15881592
msgstr "Código de Recuperación:"
15891593

@@ -1710,7 +1714,7 @@ msgstr "Pedido con parámetros incorrectos"
17101714
msgid "Reset"
17111715
msgstr "Limpiar"
17121716

1713-
#: src/views/preference/components/TOTP.vue:130
1717+
#: src/views/preference/components/TOTP.vue:132
17141718
msgid "Reset 2FA"
17151719
msgstr "Restablecer 2FA"
17161720

@@ -1761,7 +1765,7 @@ msgstr "Guardado con éxito"
17611765
msgid "Saved successfully"
17621766
msgstr "Guardado con éxito"
17631767

1764-
#: src/views/preference/components/TOTP.vue:91
1768+
#: src/views/preference/components/TOTP.vue:93
17651769
msgid "Scan the QR code with your mobile phone to add the account to the app."
17661770
msgstr ""
17671771
"Escanee el código QR con su teléfono móvil para agregar la cuenta a la "
@@ -1771,6 +1775,10 @@ msgstr ""
17711775
msgid "SDK"
17721776
msgstr "SDK"
17731777

1778+
#: src/views/preference/components/TOTP.vue:149
1779+
msgid "Secret has been copied"
1780+
msgstr ""
1781+
17741782
#: src/components/StdDesign/StdDataEntry/components/StdSelector.vue:155
17751783
msgid "Selector"
17761784
msgstr "Seleccionador"
@@ -1793,8 +1801,8 @@ msgstr "Enviado"
17931801
#: src/views/environment/BatchUpgrader.vue:57
17941802
#: src/views/environment/Environment.vue:15 src/views/other/Install.vue:68
17951803
#: src/views/preference/AuthSettings.vue:49
1796-
#: src/views/preference/components/TOTP.vue:42
1797-
#: src/views/preference/components/TOTP.vue:55
1804+
#: src/views/preference/components/TOTP.vue:44
1805+
#: src/views/preference/components/TOTP.vue:57
17981806
#: src/views/preference/Preference.vue:83 src/views/stream/StreamList.vue:113
17991807
#: src/views/stream/StreamList.vue:81 src/views/system/Upgrade.vue:42
18001808
msgid "Server error"
@@ -2037,7 +2045,7 @@ msgstr "La ruta existe, pero el archivo no es un certificado"
20372045
msgid "The path exists, but the file is not a private key"
20382046
msgstr "La ruta existe, pero el archivo no es una clave privada"
20392047

2040-
#: src/views/preference/components/TOTP.vue:109
2048+
#: src/views/preference/components/TOTP.vue:111
20412049
msgid ""
20422050
"The recovery code is only displayed once, please save it in a safe place."
20432051
msgstr ""
@@ -2118,7 +2126,7 @@ msgstr "Consejos"
21182126
msgid "Title"
21192127
msgstr "Título"
21202128

2121-
#: src/views/preference/components/TOTP.vue:90
2129+
#: src/views/preference/components/TOTP.vue:92
21222130
msgid ""
21232131
"To enable it, you need to install the Google or Microsoft Authenticator app "
21242132
"on your mobile phone."
@@ -2148,7 +2156,7 @@ msgstr ""
21482156
"Demasiados intentos fallidos de inicio de sesión, por favor intente "
21492157
"nuevamente más tarde"
21502158

2151-
#: src/views/preference/components/TOTP.vue:89
2159+
#: src/views/preference/components/TOTP.vue:91
21522160
msgid ""
21532161
"TOTP is a two-factor authentication method that uses a time-based one-time "
21542162
"password algorithm."

0 commit comments

Comments
 (0)