@adminforth/two-factors-auth 1.1.2-next.1 → 1.2.0

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/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # AdminForth TwoFactorsAuth Plugin
2
+
3
+ <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT" /> <img src="https://woodpecker.devforth.io/api/badges/3848/status.svg" alt="Build Status" /> <a href="https://www.npmjs.com/package/@adminforth/two-factors-auth"> <img src="https://img.shields.io/npm/dt/@adminforth/two-factors-auth" alt="npm downloads" /></a> <a href="https://www.npmjs.com/package/@adminforth/two-factors-auth"><img src="https://img.shields.io/npm/v/@adminforth/two-factors-auth" alt="npm version" /></a> <a href="https://www.npmjs.com/package/@adminforth/two-factors-auth">
4
+
5
+ Allows to enable Two-Factor Authentication to an adminforth application.
6
+
7
+ ## For usage, see [AdminForth TwoFactorsAuth Documentation](https://adminforth.dev/docs/tutorial/Plugins/TwoFactorsAuth/)
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,025 bytes received 115 bytes 52,280.00 bytes/sec
14
- total size is 25,596 speedup is 0.98
13
+ sent 26,163 bytes received 115 bytes 52,556.00 bytes/sec
14
+ total size is 25,734 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
 
@@ -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
 
@@ -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>
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@adminforth/two-factors-auth",
3
- "version": "1.1.2-next.1",
3
+ "version": "1.2.0",
4
4
  "description": "AdminForth plugin for two factors authentication",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
+ "homepage": "https://adminforth.dev/docs/tutorial/Plugins/TwoFactorsAuth/",
7
8
  "repository": {
8
9
  "type": "git",
9
10
  "url": "https://github.com/devforth/adminforth-two-factors-auth.git"