@adminforth/two-factors-auth 2.3.0 → 2.4.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/build.log +1 -1
- package/dist/index.js +2 -2
- package/index.ts +3 -3
- package/package.json +2 -2
- package/types.ts +5 -0
package/build.log
CHANGED
package/dist/index.js
CHANGED
|
@@ -166,9 +166,9 @@ export default class TwoFactorsAuthPlugin extends AdminForthPlugin {
|
|
|
166
166
|
if (this.options.passkeys.allowLoginWithPasskeys !== false) {
|
|
167
167
|
this.options.passkeys.allowLoginWithPasskeys = true;
|
|
168
168
|
if (!this.adminforth.config.customization.loginPageInjections) {
|
|
169
|
-
this.adminforth.config.customization.loginPageInjections = {
|
|
169
|
+
this.adminforth.config.customization.loginPageInjections = { underLoginButton: [], panelHeader: [], underInputs: [] };
|
|
170
170
|
}
|
|
171
|
-
this.adminforth.config.customization.loginPageInjections.
|
|
171
|
+
this.adminforth.config.customization.loginPageInjections.underLoginButton.push({ file: this.componentPath('LoginWithPasskeyButton.vue'), meta: { afOrder: this.options.passkeys.continueWithButtonsOrder || 0 } });
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
}
|
package/index.ts
CHANGED
|
@@ -178,9 +178,9 @@ export default class TwoFactorsAuthPlugin extends AdminForthPlugin {
|
|
|
178
178
|
if ( this.options.passkeys.allowLoginWithPasskeys !== false ) {
|
|
179
179
|
this.options.passkeys.allowLoginWithPasskeys = true;
|
|
180
180
|
if ( !this.adminforth.config.customization.loginPageInjections ) {
|
|
181
|
-
this.adminforth.config.customization.loginPageInjections = {
|
|
182
|
-
}
|
|
183
|
-
|
|
181
|
+
this.adminforth.config.customization.loginPageInjections = { underLoginButton: [], panelHeader: [], underInputs: [] };
|
|
182
|
+
}
|
|
183
|
+
(this.adminforth.config.customization.loginPageInjections.underLoginButton as Array<any>).push({ file: this.componentPath('LoginWithPasskeyButton.vue'), meta: { afOrder: this.options.passkeys.continueWithButtonsOrder || 0 } });
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminforth/two-factors-auth",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "AdminForth plugin for two factors authentication",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"license": "ISC",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@simplewebauthn/server": "^13.2.1",
|
|
29
|
-
"adminforth": "^2.
|
|
29
|
+
"adminforth": "^2.4.0-next.221",
|
|
30
30
|
"node-2fa": "^2.0.3"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
package/types.ts
CHANGED
|
@@ -36,6 +36,11 @@ export type PluginOptions = {
|
|
|
36
36
|
* Remember user for number of days after login with Passkey, so that user won't be challenged with 2FA on every login.
|
|
37
37
|
*/
|
|
38
38
|
rememberDaysAfterPasskeyLogin?: number;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Order of "Continue with passkey" button in under login button injection
|
|
42
|
+
*/
|
|
43
|
+
continueWithButtonsOrder?: number,
|
|
39
44
|
/**
|
|
40
45
|
* Period between showing alert suggesting to set up Passkeys if not set up yet.
|
|
41
46
|
*/
|