@adminforth/two-factors-auth 1.1.0 → 1.1.2-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.woodpecker/release.yml +1 -2
- package/build.log +11 -1
- package/custom/TwoFactorsConfirmation.vue +1 -0
- package/custom/TwoFactorsSetup.vue +1 -0
- package/dist/custom/TwoFactorsConfirmation.vue +176 -0
- package/dist/custom/TwoFactorsSetup.vue +208 -0
- package/dist/custom/package-lock.json +301 -0
- package/dist/custom/package.json +16 -0
- package/dist/custom/tsconfig.json +19 -0
- package/package.json +2 -2
package/.woodpecker/release.yml
CHANGED
|
@@ -22,9 +22,8 @@ steps:
|
|
|
22
22
|
image: node:20
|
|
23
23
|
when:
|
|
24
24
|
- event: push
|
|
25
|
-
volumes:
|
|
26
|
-
- /var/run/docker.sock:/var/run/docker.sock
|
|
27
25
|
commands:
|
|
26
|
+
- apt update && apt install -y rsync
|
|
28
27
|
- export $(cat /woodpecker/deploy.vault.env | xargs)
|
|
29
28
|
- npm clean-install
|
|
30
29
|
- /bin/bash ./.woodpecker/buildRelease.sh
|
package/build.log
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
> @adminforth/two-factors-auth@1.0.33 build
|
|
3
|
-
> tsc
|
|
3
|
+
> tsc && rsync -av --exclude 'node_modules' custom dist/
|
|
4
4
|
|
|
5
|
+
sending incremental file list
|
|
6
|
+
custom/
|
|
7
|
+
custom/TwoFactorsConfirmation.vue
|
|
8
|
+
custom/TwoFactorsSetup.vue
|
|
9
|
+
custom/package-lock.json
|
|
10
|
+
custom/package.json
|
|
11
|
+
custom/tsconfig.json
|
|
12
|
+
|
|
13
|
+
sent 26,025 bytes received 115 bytes 52,280.00 bytes/sec
|
|
14
|
+
total size is 25,596 speedup is 0.98
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
input-classes="bg-gray-50 text-center flex justify-center otp-input border leading-none border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-10 h-10 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
21
21
|
:conditionalClass="['one', 'two', 'three', 'four', 'five', 'six']"
|
|
22
22
|
inputType="number"
|
|
23
|
+
inputmode="numeric"
|
|
23
24
|
:num-inputs="6"
|
|
24
25
|
v-model:value="bindValue"
|
|
25
26
|
:should-auto-focus="true"
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
input-classes="bg-gray-50 text-center flex justify-center otp-input border leading-none border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-10 h-10 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
40
40
|
:conditionalClass="['one', 'two', 'three', 'four', 'five', 'six']"
|
|
41
41
|
inputType="number"
|
|
42
|
+
inputmode="numeric"
|
|
42
43
|
:num-inputs="6"
|
|
43
44
|
:should-auto-focus="true"
|
|
44
45
|
:should-focus-order="true"
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="relative flex items-center justify-center min-h-screen bg-gray-100 dark:bg-gray-800"
|
|
3
|
+
:style="(coreStore.config?.loginBackgroundImage && coreStore.config?.loginBackgroundPosition === 'over') ? {
|
|
4
|
+
'background-image': 'url(' + loadFile(coreStore.config?.loginBackgroundImage) + ')',
|
|
5
|
+
'background-size': 'cover',
|
|
6
|
+
'background-position': 'center',
|
|
7
|
+
'background-blend-mode': 'darken'
|
|
8
|
+
}: {}"
|
|
9
|
+
>
|
|
10
|
+
|
|
11
|
+
<div id="authentication-modal" tabindex="-1" class=" overflow-y-auto overflow-x-hidden z-50 min-w-[00px] justify-center items-center md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
|
12
|
+
<div class="relative p-4 w-full max-w-md max-h-full">
|
|
13
|
+
<!-- Modal content -->
|
|
14
|
+
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700 dark:shadow-black text-gray-500" >
|
|
15
|
+
<div class="p-8 w-full max-w-md max-h-full" >
|
|
16
|
+
<div class="m-3">{{$t('Please enter your authenticator code')}} </div>
|
|
17
|
+
<div class="my-4 flex justify-center items-center">
|
|
18
|
+
<v-otp-input
|
|
19
|
+
ref="code"
|
|
20
|
+
input-classes="bg-gray-50 text-center flex justify-center otp-input border leading-none border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-10 h-10 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
21
|
+
:conditionalClass="['one', 'two', 'three', 'four', 'five', 'six']"
|
|
22
|
+
inputType="number"
|
|
23
|
+
inputmode="numeric"
|
|
24
|
+
:num-inputs="6"
|
|
25
|
+
v-model:value="bindValue"
|
|
26
|
+
:should-auto-focus="true"
|
|
27
|
+
:should-focus-order="true"
|
|
28
|
+
@on-complete="handleOnComplete"
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
<!-- <Vue2FACodeInput v-model="code"/> -->
|
|
32
|
+
<LinkButton to="/login" class="w-full">{{$t('Back to login')}}</LinkButton>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
<script setup>
|
|
45
|
+
|
|
46
|
+
import { onMounted, onBeforeUnmount, ref, watchEffect,computed,watch } from 'vue';
|
|
47
|
+
import { useCoreStore } from '@/stores/core';
|
|
48
|
+
import { useUserStore } from '@/stores/user';
|
|
49
|
+
import { IconEyeSolid, IconEyeSlashSolid } from '@iconify-prerendered/vue-flowbite';
|
|
50
|
+
import { callAdminForthApi, loadFile } from '@/utils';
|
|
51
|
+
import { useRouter } from 'vue-router';
|
|
52
|
+
import { showErrorTost } from '@/composables/useFrontendApi';
|
|
53
|
+
import { LinkButton } from '@/afcl';
|
|
54
|
+
import Vue2FACodeInput from '@loltech/vue3-2fa-code-input';
|
|
55
|
+
import VOtpInput from "vue3-otp-input";
|
|
56
|
+
|
|
57
|
+
const code = ref(null);
|
|
58
|
+
|
|
59
|
+
const handleOnComplete = (value) => {
|
|
60
|
+
sendCode(value);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const fillInput = (value) => {
|
|
64
|
+
code.value?.fillInput(value);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const router = useRouter();
|
|
68
|
+
const inProgress = ref(false);
|
|
69
|
+
|
|
70
|
+
const coreStore = useCoreStore();
|
|
71
|
+
const user = useUserStore();
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
// use this simple function to automatically focus on the next input
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
const showPw = ref(false);
|
|
79
|
+
|
|
80
|
+
const error = ref(null);
|
|
81
|
+
const totp = ref({});
|
|
82
|
+
const totpJWT = ref(null);
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
function parseJwt(token) {
|
|
86
|
+
// Split the token into its parts
|
|
87
|
+
const base64Url = token.split('.')[1];
|
|
88
|
+
|
|
89
|
+
// Base64-decode the payload
|
|
90
|
+
const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
|
|
91
|
+
const jsonPayload = decodeURIComponent(atob(base64).split('').map(function(c) {
|
|
92
|
+
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
|
93
|
+
}).join(''));
|
|
94
|
+
|
|
95
|
+
// Parse the JSON payload
|
|
96
|
+
return JSON.parse(jsonPayload);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
onMounted(async () => {
|
|
100
|
+
coreStore.getPublicConfig();
|
|
101
|
+
window.addEventListener('paste', handlePaste);
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
onBeforeUnmount(() => {
|
|
105
|
+
window.removeEventListener('paste', handlePaste);
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
async function sendCode (value) {
|
|
109
|
+
inProgress.value = true;
|
|
110
|
+
const resp = await callAdminForthApi({
|
|
111
|
+
method: 'POST',
|
|
112
|
+
path: '/plugin/twofa/confirmSetup',
|
|
113
|
+
body: {
|
|
114
|
+
code: value,
|
|
115
|
+
secret: null,
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
if (resp.allowedLogin){
|
|
119
|
+
await user.finishLogin();
|
|
120
|
+
} else {
|
|
121
|
+
showErrorTost('Invalid code');
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// watch(code, async (nv)=>{
|
|
126
|
+
// if (nv){
|
|
127
|
+
// sendCode();
|
|
128
|
+
// }
|
|
129
|
+
// })
|
|
130
|
+
|
|
131
|
+
function handlePaste(event) {
|
|
132
|
+
event.preventDefault();
|
|
133
|
+
if (event.target.classList.contains('otp-input')) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const pastedText = event.clipboardData?.getData('text') || '';
|
|
137
|
+
if (pastedText.length === 6) {
|
|
138
|
+
code.value?.fillInput(pastedText);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
</script>
|
|
142
|
+
|
|
143
|
+
<style lang='scss'>
|
|
144
|
+
.vue3-2fa-code-input {
|
|
145
|
+
display: flex;
|
|
146
|
+
justify-content: center;
|
|
147
|
+
gap: 1rem;
|
|
148
|
+
margin-bottom: 1rem;
|
|
149
|
+
}
|
|
150
|
+
.otp-input {
|
|
151
|
+
margin: 0 5px;
|
|
152
|
+
}
|
|
153
|
+
.vue3-2fa-code-input-box {
|
|
154
|
+
&[type='text'] {
|
|
155
|
+
@apply w-10 h-10 text-center text-xl border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500;
|
|
156
|
+
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* This particular piece of code makes the last input have a gap in the middle.
|
|
163
|
+
*/
|
|
164
|
+
.spaced-code-input {
|
|
165
|
+
& .vue3-2fa-code-input-box {
|
|
166
|
+
&:nth-child(3) {
|
|
167
|
+
@apply mr-4;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&:nth-child(4) {
|
|
171
|
+
@apply ml-4;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
</style>
|
|
176
|
+
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="relative flex items-center justify-center min-h-screen bg-gray-100 dark:bg-gray-800"
|
|
3
|
+
:style="coreStore.config?.loginBackgroundImage && coreStore.config?.loginBackgroundPosition === 'over' ? {
|
|
4
|
+
'background-image': 'url(' + loadFile(coreStore.config?.loginBackgroundImage) + ')',
|
|
5
|
+
'background-size': 'cover',
|
|
6
|
+
'background-position': 'center',
|
|
7
|
+
'background-blend-mode': 'darken'
|
|
8
|
+
}: {}"
|
|
9
|
+
>
|
|
10
|
+
|
|
11
|
+
<div id="authentication-modal" tabindex="-1" class=" overflow-y-auto overflow-x-hidden z-50 min-w-[00px] justify-center items-center md:inset-0 h-[calc(100%-1rem)] max-h-full">
|
|
12
|
+
<div class="relative p-4 w-full max-w-md max-h-full">
|
|
13
|
+
<!-- Modal content -->
|
|
14
|
+
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700 dark:shadow-black text-gray-500" >
|
|
15
|
+
<div class="p-8 w-full max-w-md max-h-full" >
|
|
16
|
+
<div class="m-3" >{{$t('Scan this QR code with your authenticator app or open by')}} <a class="text-blue-600" :href="totpUri">{{$t('click')}}</a></div>
|
|
17
|
+
<div class="flex justify-center m-3" >
|
|
18
|
+
<img :src="totpQrCode" alt="QR code" />
|
|
19
|
+
</div>
|
|
20
|
+
<div class="m-3 ">
|
|
21
|
+
<div class="m-1">{{$t('Or copy this code to app manually:')}}</div>
|
|
22
|
+
<div class="w-full max-w-[46rem]">
|
|
23
|
+
<div class="relative">
|
|
24
|
+
<label for="npm-install-copy-text" class="sr-only">{{$t('Label')}}</label>
|
|
25
|
+
<input id="npm-install-copy-text" type="text" class="col-span-10 bg-gray-50 border border-gray-300 text-gray-500 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full px-2.5 py-4 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500 pr-12" :value="totp.newSecret" readonly>
|
|
26
|
+
<button @click="onCopyClick" data-copy-to-clipboard-target="npm-install-copy-text" class="absolute end-2.5 top-1/2 -translate-y-1/2 text-gray-900 dark:text-gray-400 hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-600 dark:hover:bg-gray-700 rounded-lg py-2 px-2.5 inline-flex items-center justify-center bg-white border-gray-200 border">
|
|
27
|
+
<span id="default-message" class="inline-flex items-center">
|
|
28
|
+
<svg class="w-3 h-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 18 20">
|
|
29
|
+
<path d="M16 1h-3.278A1.992 1.992 0 0 0 11 0H7a1.993 1.993 0 0 0-1.722 1H2a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2Zm-3 14H5a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2Zm0-4H5a1 1 0 0 1 0-2h8a1 1 0 1 1 0 2Zm0-5H5a1 1 0 0 1 0-2h2V2h4v2h2a1 1 0 1 1 0 2Z"/>
|
|
30
|
+
</svg>
|
|
31
|
+
</span>
|
|
32
|
+
</button>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="my-4 flex justify-center items-center">
|
|
37
|
+
<v-otp-input
|
|
38
|
+
ref="code"
|
|
39
|
+
input-classes="bg-gray-50 text-center flex justify-center otp-input border leading-none border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-10 h-10 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
40
|
+
:conditionalClass="['one', 'two', 'three', 'four', 'five', 'six']"
|
|
41
|
+
inputType="number"
|
|
42
|
+
inputmode="numeric"
|
|
43
|
+
:num-inputs="6"
|
|
44
|
+
:should-auto-focus="true"
|
|
45
|
+
:should-focus-order="true"
|
|
46
|
+
@on-complete="handleOnComplete"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
<!-- <Vue2FACodeInput v-model="code" autofocus /> -->
|
|
50
|
+
<div class="flex flex-row gap-2.5">
|
|
51
|
+
<LinkButton to="/login" class="w-full">
|
|
52
|
+
{{$t('Back to login')}}
|
|
53
|
+
</LinkButton>
|
|
54
|
+
<Button v-if="skipAllowed" @click="handleSkip" class="w-full">
|
|
55
|
+
{{$t('Skip for now')}}
|
|
56
|
+
</Button>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
<script setup lang="ts">
|
|
69
|
+
|
|
70
|
+
import { onMounted, onBeforeUnmount, ref, watchEffect,computed,watch } from 'vue';
|
|
71
|
+
import { useCoreStore } from '@/stores/core';
|
|
72
|
+
import { useUserStore } from '@/stores/user';
|
|
73
|
+
import { IconEyeSolid, IconEyeSlashSolid } from '@iconify-prerendered/vue-flowbite';
|
|
74
|
+
import { callAdminForthApi, loadFile } from '@/utils';
|
|
75
|
+
import { useRouter } from 'vue-router';
|
|
76
|
+
import { showErrorTost } from '@/composables/useFrontendApi';
|
|
77
|
+
import { Button, LinkButton } from '@/afcl';
|
|
78
|
+
import Vue2FACodeInput from '@loltech/vue3-2fa-code-input';
|
|
79
|
+
import VOtpInput from "vue3-otp-input";
|
|
80
|
+
import adminforth from '@/adminforth';
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
const code = ref(null);
|
|
84
|
+
const handleOnComplete = (value) => {
|
|
85
|
+
sendCode(value);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const router = useRouter();
|
|
89
|
+
const inProgress = ref(false);
|
|
90
|
+
|
|
91
|
+
const coreStore = useCoreStore();
|
|
92
|
+
const user = useUserStore();
|
|
93
|
+
|
|
94
|
+
const skipAllowed = ref(false);
|
|
95
|
+
|
|
96
|
+
// use this simple function to automatically focus on the next input
|
|
97
|
+
|
|
98
|
+
const showPw = ref(false);
|
|
99
|
+
|
|
100
|
+
const error = ref(null);
|
|
101
|
+
const totp = ref({});
|
|
102
|
+
const totpJWT = ref(null);
|
|
103
|
+
const totpUri = computed(() => {
|
|
104
|
+
if (totp.value) {
|
|
105
|
+
return `otpauth://totp/${totp.value.issuer}:${totp.value.userName}?secret=${totp.value.newSecret}&issuer=${totp.value.issuer}`;
|
|
106
|
+
}});
|
|
107
|
+
const totpQrCode = computed(() => {
|
|
108
|
+
if (totpUri.value) {
|
|
109
|
+
return `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(totpUri.value)}`;
|
|
110
|
+
}});
|
|
111
|
+
|
|
112
|
+
function parseJwt(token) {
|
|
113
|
+
// Split the token into its parts
|
|
114
|
+
const base64Url = token.split('.')[1];
|
|
115
|
+
|
|
116
|
+
// Base64-decode the payload
|
|
117
|
+
const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
|
|
118
|
+
const jsonPayload = decodeURIComponent(atob(base64).split('').map(function(c) {
|
|
119
|
+
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
|
120
|
+
}).join(''));
|
|
121
|
+
|
|
122
|
+
// Parse the JSON payload
|
|
123
|
+
return JSON.parse(jsonPayload);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function onCopyClick(){
|
|
127
|
+
navigator.clipboard.writeText(totp.value.newSecret);
|
|
128
|
+
adminforth.alert({message: 'Copied to clipboard', variant: 'success'})
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
onMounted(async () => {
|
|
132
|
+
coreStore.getPublicConfig()
|
|
133
|
+
const resp = await callAdminForthApi({
|
|
134
|
+
path: '/plugin/twofa/initSetup',
|
|
135
|
+
method: 'POST',});
|
|
136
|
+
if (resp && resp.totpJWT){
|
|
137
|
+
totpJWT.value = resp.totpJWT;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
totp.value=parseJwt(totpJWT.value);
|
|
141
|
+
|
|
142
|
+
const allowSkipResp = await callAdminForthApi({
|
|
143
|
+
path: '/plugin/twofa/skip-allow',
|
|
144
|
+
method: 'GET',
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
if (allowSkipResp?.skipAllowed){
|
|
148
|
+
skipAllowed.value = true;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
window.addEventListener('paste', handlePaste);
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
onBeforeUnmount(() => {
|
|
155
|
+
window.removeEventListener('paste', handlePaste);
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
async function sendCode (value) {
|
|
159
|
+
inProgress.value = true;
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
const resp = await callAdminForthApi({
|
|
163
|
+
method: 'POST',
|
|
164
|
+
path: '/plugin/twofa/confirmSetup',
|
|
165
|
+
body: {
|
|
166
|
+
code: value,
|
|
167
|
+
secret: totp.value.newSecret,
|
|
168
|
+
}
|
|
169
|
+
})
|
|
170
|
+
if (resp.allowedLogin){
|
|
171
|
+
await user.finishLogin()
|
|
172
|
+
} else {
|
|
173
|
+
showErrorTost('Invalid code');
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
function handlePaste(event) {
|
|
179
|
+
event.preventDefault();
|
|
180
|
+
if (event.target.classList.contains('otp-input')) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const pastedText = event.clipboardData?.getData('text') || '';
|
|
184
|
+
if (pastedText.length === 6) {
|
|
185
|
+
code.value?.fillInput(pastedText);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const handleSkip = async () => {
|
|
190
|
+
const resp = await callAdminForthApi({
|
|
191
|
+
method: 'POST',
|
|
192
|
+
path: '/plugin/twofa/confirmSetup',
|
|
193
|
+
body: {
|
|
194
|
+
skip: true,
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
if (resp.allowedLogin){
|
|
198
|
+
await user.finishLogin()
|
|
199
|
+
} else {
|
|
200
|
+
showErrorTost('Something went wrong');
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
</script>
|
|
204
|
+
<style>
|
|
205
|
+
.otp-input {
|
|
206
|
+
margin: 0 5px;
|
|
207
|
+
}
|
|
208
|
+
</style>
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "custom",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"lockfileVersion": 3,
|
|
5
|
+
"requires": true,
|
|
6
|
+
"packages": {
|
|
7
|
+
"": {
|
|
8
|
+
"name": "custom",
|
|
9
|
+
"version": "1.0.0",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@loltech/vue3-2fa-code-input": "^1.1.0",
|
|
13
|
+
"vue3-otp-input": "^0.5.21"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"node_modules/@babel/helper-string-parser": {
|
|
17
|
+
"version": "7.25.9",
|
|
18
|
+
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz",
|
|
19
|
+
"integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=6.9.0"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"node_modules/@babel/helper-validator-identifier": {
|
|
26
|
+
"version": "7.25.9",
|
|
27
|
+
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz",
|
|
28
|
+
"integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=6.9.0"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"node_modules/@babel/parser": {
|
|
35
|
+
"version": "7.25.9",
|
|
36
|
+
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.9.tgz",
|
|
37
|
+
"integrity": "sha512-aI3jjAAO1fh7vY/pBGsn1i9LDbRP43+asrRlkPuTXW5yHXtd1NgTEMudbBoDDxrf1daEEfPJqR+JBMakzrR4Dg==",
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@babel/types": "^7.25.9"
|
|
41
|
+
},
|
|
42
|
+
"bin": {
|
|
43
|
+
"parser": "bin/babel-parser.js"
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=6.0.0"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"node_modules/@babel/types": {
|
|
50
|
+
"version": "7.25.9",
|
|
51
|
+
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.9.tgz",
|
|
52
|
+
"integrity": "sha512-OwS2CM5KocvQ/k7dFJa8i5bNGJP0hXWfVCfDkqRFP1IreH1JDC7wG6eCYCi0+McbfT8OR/kNqsI0UU0xP9H6PQ==",
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@babel/helper-string-parser": "^7.25.9",
|
|
56
|
+
"@babel/helper-validator-identifier": "^7.25.9"
|
|
57
|
+
},
|
|
58
|
+
"engines": {
|
|
59
|
+
"node": ">=6.9.0"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"node_modules/@jridgewell/sourcemap-codec": {
|
|
63
|
+
"version": "1.5.0",
|
|
64
|
+
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
|
|
65
|
+
"integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
|
|
66
|
+
"license": "MIT"
|
|
67
|
+
},
|
|
68
|
+
"node_modules/@loltech/vue3-2fa-code-input": {
|
|
69
|
+
"version": "1.1.0",
|
|
70
|
+
"resolved": "https://registry.npmjs.org/@loltech/vue3-2fa-code-input/-/vue3-2fa-code-input-1.1.0.tgz",
|
|
71
|
+
"integrity": "sha512-styyoQjsARSeVf6E5qMvYIVkLRrwYtfL8xDl5W+g9wKF8qlr2XGU2gi9maEg0X4Us41kJryXBzfRMUcv5tKIBA=="
|
|
72
|
+
},
|
|
73
|
+
"node_modules/@vue/compiler-core": {
|
|
74
|
+
"version": "3.5.12",
|
|
75
|
+
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.12.tgz",
|
|
76
|
+
"integrity": "sha512-ISyBTRMmMYagUxhcpyEH0hpXRd/KqDU4ymofPgl2XAkY9ZhQ+h0ovEZJIiPop13UmR/54oA2cgMDjgroRelaEw==",
|
|
77
|
+
"license": "MIT",
|
|
78
|
+
"dependencies": {
|
|
79
|
+
"@babel/parser": "^7.25.3",
|
|
80
|
+
"@vue/shared": "3.5.12",
|
|
81
|
+
"entities": "^4.5.0",
|
|
82
|
+
"estree-walker": "^2.0.2",
|
|
83
|
+
"source-map-js": "^1.2.0"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"node_modules/@vue/compiler-dom": {
|
|
87
|
+
"version": "3.5.12",
|
|
88
|
+
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.12.tgz",
|
|
89
|
+
"integrity": "sha512-9G6PbJ03uwxLHKQ3P42cMTi85lDRvGLB2rSGOiQqtXELat6uI4n8cNz9yjfVHRPIu+MsK6TE418Giruvgptckg==",
|
|
90
|
+
"license": "MIT",
|
|
91
|
+
"dependencies": {
|
|
92
|
+
"@vue/compiler-core": "3.5.12",
|
|
93
|
+
"@vue/shared": "3.5.12"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"node_modules/@vue/compiler-sfc": {
|
|
97
|
+
"version": "3.5.12",
|
|
98
|
+
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.12.tgz",
|
|
99
|
+
"integrity": "sha512-2k973OGo2JuAa5+ZlekuQJtitI5CgLMOwgl94BzMCsKZCX/xiqzJYzapl4opFogKHqwJk34vfsaKpfEhd1k5nw==",
|
|
100
|
+
"license": "MIT",
|
|
101
|
+
"dependencies": {
|
|
102
|
+
"@babel/parser": "^7.25.3",
|
|
103
|
+
"@vue/compiler-core": "3.5.12",
|
|
104
|
+
"@vue/compiler-dom": "3.5.12",
|
|
105
|
+
"@vue/compiler-ssr": "3.5.12",
|
|
106
|
+
"@vue/shared": "3.5.12",
|
|
107
|
+
"estree-walker": "^2.0.2",
|
|
108
|
+
"magic-string": "^0.30.11",
|
|
109
|
+
"postcss": "^8.4.47",
|
|
110
|
+
"source-map-js": "^1.2.0"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"node_modules/@vue/compiler-ssr": {
|
|
114
|
+
"version": "3.5.12",
|
|
115
|
+
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.12.tgz",
|
|
116
|
+
"integrity": "sha512-eLwc7v6bfGBSM7wZOGPmRavSWzNFF6+PdRhE+VFJhNCgHiF8AM7ccoqcv5kBXA2eWUfigD7byekvf/JsOfKvPA==",
|
|
117
|
+
"license": "MIT",
|
|
118
|
+
"dependencies": {
|
|
119
|
+
"@vue/compiler-dom": "3.5.12",
|
|
120
|
+
"@vue/shared": "3.5.12"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"node_modules/@vue/reactivity": {
|
|
124
|
+
"version": "3.5.12",
|
|
125
|
+
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.12.tgz",
|
|
126
|
+
"integrity": "sha512-UzaN3Da7xnJXdz4Okb/BGbAaomRHc3RdoWqTzlvd9+WBR5m3J39J1fGcHes7U3za0ruYn/iYy/a1euhMEHvTAg==",
|
|
127
|
+
"license": "MIT",
|
|
128
|
+
"dependencies": {
|
|
129
|
+
"@vue/shared": "3.5.12"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"node_modules/@vue/runtime-core": {
|
|
133
|
+
"version": "3.5.12",
|
|
134
|
+
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.12.tgz",
|
|
135
|
+
"integrity": "sha512-hrMUYV6tpocr3TL3Ad8DqxOdpDe4zuQY4HPY3X/VRh+L2myQO8MFXPAMarIOSGNu0bFAjh1yBkMPXZBqCk62Uw==",
|
|
136
|
+
"license": "MIT",
|
|
137
|
+
"dependencies": {
|
|
138
|
+
"@vue/reactivity": "3.5.12",
|
|
139
|
+
"@vue/shared": "3.5.12"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"node_modules/@vue/runtime-dom": {
|
|
143
|
+
"version": "3.5.12",
|
|
144
|
+
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.12.tgz",
|
|
145
|
+
"integrity": "sha512-q8VFxR9A2MRfBr6/55Q3umyoN7ya836FzRXajPB6/Vvuv0zOPL+qltd9rIMzG/DbRLAIlREmnLsplEF/kotXKA==",
|
|
146
|
+
"license": "MIT",
|
|
147
|
+
"dependencies": {
|
|
148
|
+
"@vue/reactivity": "3.5.12",
|
|
149
|
+
"@vue/runtime-core": "3.5.12",
|
|
150
|
+
"@vue/shared": "3.5.12",
|
|
151
|
+
"csstype": "^3.1.3"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"node_modules/@vue/server-renderer": {
|
|
155
|
+
"version": "3.5.12",
|
|
156
|
+
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.12.tgz",
|
|
157
|
+
"integrity": "sha512-I3QoeDDeEPZm8yR28JtY+rk880Oqmj43hreIBVTicisFTx/Dl7JpG72g/X7YF8hnQD3IFhkky5i2bPonwrTVPg==",
|
|
158
|
+
"license": "MIT",
|
|
159
|
+
"dependencies": {
|
|
160
|
+
"@vue/compiler-ssr": "3.5.12",
|
|
161
|
+
"@vue/shared": "3.5.12"
|
|
162
|
+
},
|
|
163
|
+
"peerDependencies": {
|
|
164
|
+
"vue": "3.5.12"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"node_modules/@vue/shared": {
|
|
168
|
+
"version": "3.5.12",
|
|
169
|
+
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.12.tgz",
|
|
170
|
+
"integrity": "sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg==",
|
|
171
|
+
"license": "MIT"
|
|
172
|
+
},
|
|
173
|
+
"node_modules/csstype": {
|
|
174
|
+
"version": "3.1.3",
|
|
175
|
+
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
|
|
176
|
+
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
|
|
177
|
+
"license": "MIT"
|
|
178
|
+
},
|
|
179
|
+
"node_modules/entities": {
|
|
180
|
+
"version": "4.5.0",
|
|
181
|
+
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
|
|
182
|
+
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
|
|
183
|
+
"license": "BSD-2-Clause",
|
|
184
|
+
"engines": {
|
|
185
|
+
"node": ">=0.12"
|
|
186
|
+
},
|
|
187
|
+
"funding": {
|
|
188
|
+
"url": "https://github.com/fb55/entities?sponsor=1"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"node_modules/estree-walker": {
|
|
192
|
+
"version": "2.0.2",
|
|
193
|
+
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
|
|
194
|
+
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
|
|
195
|
+
"license": "MIT"
|
|
196
|
+
},
|
|
197
|
+
"node_modules/magic-string": {
|
|
198
|
+
"version": "0.30.12",
|
|
199
|
+
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz",
|
|
200
|
+
"integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==",
|
|
201
|
+
"license": "MIT",
|
|
202
|
+
"dependencies": {
|
|
203
|
+
"@jridgewell/sourcemap-codec": "^1.5.0"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"node_modules/nanoid": {
|
|
207
|
+
"version": "3.3.7",
|
|
208
|
+
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
|
|
209
|
+
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
|
|
210
|
+
"funding": [
|
|
211
|
+
{
|
|
212
|
+
"type": "github",
|
|
213
|
+
"url": "https://github.com/sponsors/ai"
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"license": "MIT",
|
|
217
|
+
"bin": {
|
|
218
|
+
"nanoid": "bin/nanoid.cjs"
|
|
219
|
+
},
|
|
220
|
+
"engines": {
|
|
221
|
+
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"node_modules/picocolors": {
|
|
225
|
+
"version": "1.1.1",
|
|
226
|
+
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
|
227
|
+
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
|
|
228
|
+
"license": "ISC"
|
|
229
|
+
},
|
|
230
|
+
"node_modules/postcss": {
|
|
231
|
+
"version": "8.4.47",
|
|
232
|
+
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz",
|
|
233
|
+
"integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==",
|
|
234
|
+
"funding": [
|
|
235
|
+
{
|
|
236
|
+
"type": "opencollective",
|
|
237
|
+
"url": "https://opencollective.com/postcss/"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"type": "tidelift",
|
|
241
|
+
"url": "https://tidelift.com/funding/github/npm/postcss"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"type": "github",
|
|
245
|
+
"url": "https://github.com/sponsors/ai"
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
"license": "MIT",
|
|
249
|
+
"dependencies": {
|
|
250
|
+
"nanoid": "^3.3.7",
|
|
251
|
+
"picocolors": "^1.1.0",
|
|
252
|
+
"source-map-js": "^1.2.1"
|
|
253
|
+
},
|
|
254
|
+
"engines": {
|
|
255
|
+
"node": "^10 || ^12 || >=14"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"node_modules/source-map-js": {
|
|
259
|
+
"version": "1.2.1",
|
|
260
|
+
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
|
261
|
+
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
|
262
|
+
"license": "BSD-3-Clause",
|
|
263
|
+
"engines": {
|
|
264
|
+
"node": ">=0.10.0"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"node_modules/vue": {
|
|
268
|
+
"version": "3.5.12",
|
|
269
|
+
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.12.tgz",
|
|
270
|
+
"integrity": "sha512-CLVZtXtn2ItBIi/zHZ0Sg1Xkb7+PU32bJJ8Bmy7ts3jxXTcbfsEfBivFYYWz1Hur+lalqGAh65Coin0r+HRUfg==",
|
|
271
|
+
"license": "MIT",
|
|
272
|
+
"dependencies": {
|
|
273
|
+
"@vue/compiler-dom": "3.5.12",
|
|
274
|
+
"@vue/compiler-sfc": "3.5.12",
|
|
275
|
+
"@vue/runtime-dom": "3.5.12",
|
|
276
|
+
"@vue/server-renderer": "3.5.12",
|
|
277
|
+
"@vue/shared": "3.5.12"
|
|
278
|
+
},
|
|
279
|
+
"peerDependencies": {
|
|
280
|
+
"typescript": "*"
|
|
281
|
+
},
|
|
282
|
+
"peerDependenciesMeta": {
|
|
283
|
+
"typescript": {
|
|
284
|
+
"optional": true
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"node_modules/vue3-otp-input": {
|
|
289
|
+
"version": "0.5.21",
|
|
290
|
+
"resolved": "https://registry.npmjs.org/vue3-otp-input/-/vue3-otp-input-0.5.21.tgz",
|
|
291
|
+
"integrity": "sha512-dRxmGJqXlU+U5dCijNCyY7ird49+pyfeQspSTqvIp2Xs+VByIluNlTOjgHrftzSdeVZggtx+Ojb8uKiRLaob4Q==",
|
|
292
|
+
"license": "MIT",
|
|
293
|
+
"dependencies": {
|
|
294
|
+
"vue": "^3.4.27"
|
|
295
|
+
},
|
|
296
|
+
"peerDependencies": {
|
|
297
|
+
"vue": "^3.0.*"
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "custom",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [],
|
|
9
|
+
"author": "",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"description": "",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@loltech/vue3-2fa-code-input": "^1.1.0",
|
|
14
|
+
"vue3-otp-input": "^0.5.21"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"baseUrl": ".", // This should point to your project root
|
|
4
|
+
"paths": {
|
|
5
|
+
"@/*": [
|
|
6
|
+
// "node_modules/adminforth/dist/spa/src/*"
|
|
7
|
+
"../../../spa/src/*"
|
|
8
|
+
],
|
|
9
|
+
"*": [
|
|
10
|
+
// "node_modules/adminforth/dist/spa/node_modules/*"
|
|
11
|
+
"../../../spa/node_modules/*"
|
|
12
|
+
],
|
|
13
|
+
"@@/*": [
|
|
14
|
+
// "node_modules/adminforth/dist/spa/src/*"
|
|
15
|
+
"."
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminforth/two-factors-auth",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2-next.1",
|
|
4
4
|
"description": "AdminForth plugin for two factors authentication",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "module",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"prepare": "npm link adminforth",
|
|
14
|
-
"build": "tsc"
|
|
14
|
+
"build": "tsc && rsync -av --exclude 'node_modules' custom dist/"
|
|
15
15
|
},
|
|
16
16
|
"keywords": [
|
|
17
17
|
"adminforth",
|