diff --git a/config/2fauth.php b/config/2fauth.php
index 82a58a30..0eddbc69 100644
--- a/config/2fauth.php
+++ b/config/2fauth.php
@@ -83,6 +83,7 @@
'preferences' => [
'showOtpAsDot' => false,
+ 'revealDottedOTP' => false,
'closeOtpOnCopy' => false,
'copyOtpOnDisplay' => false,
'useBasicQrcodeReader' => false,
diff --git a/resources/js/components/OtpDisplay.vue b/resources/js/components/OtpDisplay.vue
index 87646037..20a9a310 100644
--- a/resources/js/components/OtpDisplay.vue
+++ b/resources/js/components/OtpDisplay.vue
@@ -48,6 +48,7 @@
const generated_at = ref(null)
const hasTOTP = ref(false)
const showInlineSpinner = ref(false)
+ const revealPassword = ref(false)
const dots = ref()
const totpLooper = ref()
@@ -66,6 +67,7 @@
*
*/
const show = async (accountId) => {
+ revealPassword.value = false
// 3 possible cases :
//
@@ -225,6 +227,7 @@
}
else if(user.preferences.closeOtpOnCopy && (permit_closing || false) === true) {
emit("please-close-me");
+ revealPassword.value = false
clearOTP()
}
@@ -285,7 +288,7 @@
@keyup.enter="copyOTP(password, true)"
:title="$t('commons.copy_to_clipboard')"
>
- {{ useDisplayablePassword(password) }}
+ {{ useDisplayablePassword(password, user.preferences.showOtpAsDot && user.preferences.revealDottedOTP && revealPassword) }}
@@ -293,9 +296,15 @@
-
- - counter: {{ otpauthParams.counter }}
-
+
+ {{ $t('twofaccounts.forms.counter.label') }}: {{ otpauthParams.counter }}
+
+
+
+
0) {
@@ -48,5 +48,5 @@ export function useDisplayablePassword(pwd) {
}
}
- return user.preferences.showOtpAsDot ? pwd.replace(/[0-9]/g, '●') : pwd
+ return user.preferences.showOtpAsDot && !reveal ? pwd.replace(/[0-9]/g, '●') : pwd
}
\ No newline at end of file
diff --git a/resources/js/views/settings/Options.vue b/resources/js/views/settings/Options.vue
index ef21dc0a..4f47b8ef 100644
--- a/resources/js/views/settings/Options.vue
+++ b/resources/js/views/settings/Options.vue
@@ -165,6 +165,8 @@
savePreference('copyOtpOnDisplay', val)" fieldName="copyOtpOnDisplay" label="settings.forms.copy_otp_on_display.label" help="settings.forms.copy_otp_on_display.help" :isDisabled="!user.preferences.getOtpOnRequest" :isIndented="true" />
savePreference('showOtpAsDot', val)" fieldName="showOtpAsDot" label="settings.forms.show_otp_as_dot.label" help="settings.forms.show_otp_as_dot.help" />
+
+ savePreference('revealDottedOTP', val)" fieldName="revealDottedOTP" label="settings.forms.reveal_dotted_otp.label" help="settings.forms.reveal_dotted_otp.help" :isDisabled="!user.preferences.showOtpAsDot" :isIndented="true" />
{{ $t('settings.data_input') }}
savePreference('useBasicQrcodeReader', val)" fieldName="useBasicQrcodeReader" label="settings.forms.use_basic_qrcode_reader.label" help="settings.forms.use_basic_qrcode_reader.help" />
diff --git a/resources/js/views/twofaccounts/Accounts.vue b/resources/js/views/twofaccounts/Accounts.vue
index 146b0ea7..018531ab 100644
--- a/resources/js/views/twofaccounts/Accounts.vue
+++ b/resources/js/views/twofaccounts/Accounts.vue
@@ -34,6 +34,7 @@
const isDragging = ref(false)
const isRenewingOTPs = ref(false)
const renewedPeriod = ref(null)
+ const revealPassword = ref(null)
const otpDisplay = ref(null)
const otpDisplayProps = ref({
@@ -398,7 +399,7 @@
- {{ useDisplayablePassword(account.otp.password) }}
+ {{ useDisplayablePassword(account.otp.password, user.preferences.showOtpAsDot && user.preferences.revealDottedOTP && revealPassword == account.id) }}
+
+
+
+
+
+
diff --git a/resources/lang/en/settings.php b/resources/lang/en/settings.php
index 5d7f9447..98cc451e 100644
--- a/resources/lang/en/settings.php
+++ b/resources/lang/en/settings.php
@@ -58,6 +58,10 @@
'label' => 'Show generated OTP as dot',
'help' => 'Replace generated password caracters with *** to ensure confidentiality. Do not affect the copy/paste feature'
],
+ 'reveal_dotted_otp' => [
+ 'label' => 'Reveal obscured OTP',
+ 'help' => 'Let the ability to temporarily reveal Dot-Obscured passwords'
+ ],
'close_otp_on_copy' => [
'label' => 'Close OTP after copy',
'help' => 'Clicking a generated password to copy it automatically hide it from the screen'
diff --git a/resources/lang/en/twofaccounts.php b/resources/lang/en/twofaccounts.php
index 4797d0e6..80cfb36b 100644
--- a/resources/lang/en/twofaccounts.php
+++ b/resources/lang/en/twofaccounts.php
@@ -31,6 +31,7 @@
'accounts_deleted' => 'Account(s) successfully deleted',
'accounts_moved' => 'Account(s) successfully moved',
'export_selected_to_json' => 'Download a json export of selected accounts',
+ 'reveal' => 'reveal',
'forms' => [
'service' => [
'placeholder' => 'Google, Twitter, Apple',