@adminforth/two-factors-auth 1.1.2 → 1.2.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/buildSlackNotify.sh +1 -1
- package/.woodpecker/release.yml +0 -2
- package/build.log +2 -2
- package/custom/TwoFactorsConfirmation.vue +3 -1
- package/custom/TwoFactorsSetup.vue +9 -7
- package/dist/custom/TwoFactorsConfirmation.vue +3 -1
- package/dist/custom/TwoFactorsSetup.vue +9 -7
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ set -x
|
|
|
5
5
|
COMMIT_SHORT_SHA=$(echo $CI_COMMIT_SHA | cut -c1-8)
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
if [ "$
|
|
8
|
+
if [ "$CI_PREV_PIPELINE_STATUS" = "success" ]; then
|
|
9
9
|
MESSAGE="Did a build without issues on \`$CI_REPO_NAME/$CI_COMMIT_BRANCH\`. Commit: _${CI_COMMIT_MESSAGE}_ (<$CI_COMMIT_URL|$COMMIT_SHORT_SHA>)"
|
|
10
10
|
|
|
11
11
|
curl -s -X POST -H "Content-Type: application/json" -d '{
|
package/.woodpecker/release.yml
CHANGED
package/build.log
CHANGED
|
@@ -10,5 +10,5 @@ custom/package-lock.json
|
|
|
10
10
|
custom/package.json
|
|
11
11
|
custom/tsconfig.json
|
|
12
12
|
|
|
13
|
-
sent 26,
|
|
14
|
-
total size is 25,
|
|
13
|
+
sent 26,216 bytes received 115 bytes 52,662.00 bytes/sec
|
|
14
|
+
total size is 25,787 speedup is 0.98
|
|
@@ -53,7 +53,9 @@
|
|
|
53
53
|
import { LinkButton } from '@/afcl';
|
|
54
54
|
import Vue2FACodeInput from '@loltech/vue3-2fa-code-input';
|
|
55
55
|
import VOtpInput from "vue3-otp-input";
|
|
56
|
+
import { useI18n } from 'vue-i18n';
|
|
56
57
|
|
|
58
|
+
const { t } = useI18n();
|
|
57
59
|
const code = ref(null);
|
|
58
60
|
|
|
59
61
|
const handleOnComplete = (value) => {
|
|
@@ -118,7 +120,7 @@
|
|
|
118
120
|
if (resp.allowedLogin){
|
|
119
121
|
await user.finishLogin();
|
|
120
122
|
} else {
|
|
121
|
-
showErrorTost('Invalid code');
|
|
123
|
+
showErrorTost(t('Invalid code'));
|
|
122
124
|
}
|
|
123
125
|
}
|
|
124
126
|
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
<div class="relative p-4 w-full max-w-md max-h-full">
|
|
13
13
|
<!-- Modal content -->
|
|
14
14
|
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700 dark:shadow-black text-gray-500" >
|
|
15
|
-
<div class="p-
|
|
15
|
+
<div class="p-10 w-full max-w-md max-h-full" >
|
|
16
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
17
|
<div class="flex justify-center m-3" >
|
|
18
|
-
<img :src="totpQrCode" alt="QR code" />
|
|
18
|
+
<img :src="totpQrCode" class="min-w-[200px], min-h-[200px]" alt="QR code" />
|
|
19
19
|
</div>
|
|
20
20
|
<div class="m-3 ">
|
|
21
21
|
<div class="m-1">{{$t('Or copy this code to app manually:')}}</div>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<div class="my-4 flex justify-center items-center">
|
|
37
37
|
<v-otp-input
|
|
38
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-
|
|
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-11 h-11 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
42
|
inputmode="numeric"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
/>
|
|
48
48
|
</div>
|
|
49
49
|
<!-- <Vue2FACodeInput v-model="code" autofocus /> -->
|
|
50
|
-
<div class="flex flex-row gap-2.5">
|
|
50
|
+
<div class="flex flex-row gap-2.5 pl-3 pr-3 h-12">
|
|
51
51
|
<LinkButton to="/login" class="w-full">
|
|
52
52
|
{{$t('Back to login')}}
|
|
53
53
|
</LinkButton>
|
|
@@ -78,7 +78,9 @@ import { Button, LinkButton } from '@/afcl';
|
|
|
78
78
|
import Vue2FACodeInput from '@loltech/vue3-2fa-code-input';
|
|
79
79
|
import VOtpInput from "vue3-otp-input";
|
|
80
80
|
import adminforth from '@/adminforth';
|
|
81
|
+
import { useI18n } from 'vue-i18n';
|
|
81
82
|
|
|
83
|
+
const { t } = useI18n();
|
|
82
84
|
|
|
83
85
|
const code = ref(null);
|
|
84
86
|
const handleOnComplete = (value) => {
|
|
@@ -125,7 +127,7 @@ function parseJwt(token) {
|
|
|
125
127
|
|
|
126
128
|
function onCopyClick(){
|
|
127
129
|
navigator.clipboard.writeText(totp.value.newSecret);
|
|
128
|
-
adminforth.alert({message: 'Copied to clipboard', variant: 'success'})
|
|
130
|
+
adminforth.alert({message: t('Copied to clipboard'), variant: 'success'})
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
onMounted(async () => {
|
|
@@ -170,7 +172,7 @@ async function sendCode (value) {
|
|
|
170
172
|
if (resp.allowedLogin){
|
|
171
173
|
await user.finishLogin()
|
|
172
174
|
} else {
|
|
173
|
-
showErrorTost('Invalid code');
|
|
175
|
+
showErrorTost(t('Invalid code'));
|
|
174
176
|
}
|
|
175
177
|
}
|
|
176
178
|
|
|
@@ -197,7 +199,7 @@ const handleSkip = async () => {
|
|
|
197
199
|
if (resp.allowedLogin){
|
|
198
200
|
await user.finishLogin()
|
|
199
201
|
} else {
|
|
200
|
-
showErrorTost('Something went wrong');
|
|
202
|
+
showErrorTost(t('Something went wrong'));
|
|
201
203
|
}
|
|
202
204
|
}
|
|
203
205
|
</script>
|
|
@@ -53,7 +53,9 @@
|
|
|
53
53
|
import { LinkButton } from '@/afcl';
|
|
54
54
|
import Vue2FACodeInput from '@loltech/vue3-2fa-code-input';
|
|
55
55
|
import VOtpInput from "vue3-otp-input";
|
|
56
|
+
import { useI18n } from 'vue-i18n';
|
|
56
57
|
|
|
58
|
+
const { t } = useI18n();
|
|
57
59
|
const code = ref(null);
|
|
58
60
|
|
|
59
61
|
const handleOnComplete = (value) => {
|
|
@@ -118,7 +120,7 @@
|
|
|
118
120
|
if (resp.allowedLogin){
|
|
119
121
|
await user.finishLogin();
|
|
120
122
|
} else {
|
|
121
|
-
showErrorTost('Invalid code');
|
|
123
|
+
showErrorTost(t('Invalid code'));
|
|
122
124
|
}
|
|
123
125
|
}
|
|
124
126
|
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
<div class="relative p-4 w-full max-w-md max-h-full">
|
|
13
13
|
<!-- Modal content -->
|
|
14
14
|
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700 dark:shadow-black text-gray-500" >
|
|
15
|
-
<div class="p-
|
|
15
|
+
<div class="p-10 w-full max-w-md max-h-full" >
|
|
16
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
17
|
<div class="flex justify-center m-3" >
|
|
18
|
-
<img :src="totpQrCode" alt="QR code" />
|
|
18
|
+
<img :src="totpQrCode" class="min-w-[200px], min-h-[200px]" alt="QR code" />
|
|
19
19
|
</div>
|
|
20
20
|
<div class="m-3 ">
|
|
21
21
|
<div class="m-1">{{$t('Or copy this code to app manually:')}}</div>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<div class="my-4 flex justify-center items-center">
|
|
37
37
|
<v-otp-input
|
|
38
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-
|
|
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-11 h-11 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
42
|
inputmode="numeric"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
/>
|
|
48
48
|
</div>
|
|
49
49
|
<!-- <Vue2FACodeInput v-model="code" autofocus /> -->
|
|
50
|
-
<div class="flex flex-row gap-2.5">
|
|
50
|
+
<div class="flex flex-row gap-2.5 pl-3 pr-3 h-12">
|
|
51
51
|
<LinkButton to="/login" class="w-full">
|
|
52
52
|
{{$t('Back to login')}}
|
|
53
53
|
</LinkButton>
|
|
@@ -78,7 +78,9 @@ import { Button, LinkButton } from '@/afcl';
|
|
|
78
78
|
import Vue2FACodeInput from '@loltech/vue3-2fa-code-input';
|
|
79
79
|
import VOtpInput from "vue3-otp-input";
|
|
80
80
|
import adminforth from '@/adminforth';
|
|
81
|
+
import { useI18n } from 'vue-i18n';
|
|
81
82
|
|
|
83
|
+
const { t } = useI18n();
|
|
82
84
|
|
|
83
85
|
const code = ref(null);
|
|
84
86
|
const handleOnComplete = (value) => {
|
|
@@ -125,7 +127,7 @@ function parseJwt(token) {
|
|
|
125
127
|
|
|
126
128
|
function onCopyClick(){
|
|
127
129
|
navigator.clipboard.writeText(totp.value.newSecret);
|
|
128
|
-
adminforth.alert({message: 'Copied to clipboard', variant: 'success'})
|
|
130
|
+
adminforth.alert({message: t('Copied to clipboard'), variant: 'success'})
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
onMounted(async () => {
|
|
@@ -170,7 +172,7 @@ async function sendCode (value) {
|
|
|
170
172
|
if (resp.allowedLogin){
|
|
171
173
|
await user.finishLogin()
|
|
172
174
|
} else {
|
|
173
|
-
showErrorTost('Invalid code');
|
|
175
|
+
showErrorTost(t('Invalid code'));
|
|
174
176
|
}
|
|
175
177
|
}
|
|
176
178
|
|
|
@@ -197,7 +199,7 @@ const handleSkip = async () => {
|
|
|
197
199
|
if (resp.allowedLogin){
|
|
198
200
|
await user.finishLogin()
|
|
199
201
|
} else {
|
|
200
|
-
showErrorTost('Something went wrong');
|
|
202
|
+
showErrorTost(t('Something went wrong'));
|
|
201
203
|
}
|
|
202
204
|
}
|
|
203
205
|
</script>
|