mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-19 03:16:49 +02:00
Prevent kick-out when copying an OTP during import
This commit is contained in:
parent
a4011388ca
commit
c4b2d3a005
@ -12,6 +12,7 @@
|
|||||||
const notify = useNotifyStore()
|
const notify = useNotifyStore()
|
||||||
const $2fauth = inject('2fauth')
|
const $2fauth = inject('2fauth')
|
||||||
const { copy, copied } = useClipboard({ legacy: true })
|
const { copy, copied } = useClipboard({ legacy: true })
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
const emit = defineEmits(['please-close-me', 'increment-hotp', 'validation-error'])
|
const emit = defineEmits(['please-close-me', 'increment-hotp', 'validation-error'])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -211,7 +212,7 @@
|
|||||||
copy(otp.replace(/ /g, ''))
|
copy(otp.replace(/ /g, ''))
|
||||||
|
|
||||||
if (copied) {
|
if (copied) {
|
||||||
if(user.preferences.kickUserAfter == -1 && (permit_closing || false) === true) {
|
if(user.preferences.kickUserAfter == -1 && (permit_closing || false) === true && route.name != 'importAccounts') {
|
||||||
user.logout({ kicked: true})
|
user.logout({ kicked: true})
|
||||||
}
|
}
|
||||||
else if(user.preferences.closeOtpOnCopy && (permit_closing || false) === true) {
|
else if(user.preferences.closeOtpOnCopy && (permit_closing || false) === true) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user