@adminforth/two-factors-auth 2.10.10 → 2.10.12

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 CHANGED
@@ -15,5 +15,5 @@ custom/package.json
15
15
  custom/tsconfig.json
16
16
  custom/utils.js
17
17
 
18
- sent 273,574 bytes received 210 bytes 547,568.00 bytes/sec
19
- total size is 272,747 speedup is 1.00
18
+ sent 273,600 bytes received 210 bytes 547,620.00 bytes/sec
19
+ total size is 272,773 speedup is 1.00
@@ -200,6 +200,7 @@
200
200
  if ( newRoute.hash === '#passkey' ) {
201
201
  cancelPendingWebAuthn('switch-to-passkey');
202
202
  confirmationMode.value = 'passkey';
203
+ usePasskeyButton();
203
204
  } else if ( newRoute.hash === '#code' ) {
204
205
  cancelPendingWebAuthn('switch-to-code');
205
206
  confirmationMode.value = 'code';
@@ -200,6 +200,7 @@
200
200
  if ( newRoute.hash === '#passkey' ) {
201
201
  cancelPendingWebAuthn('switch-to-passkey');
202
202
  confirmationMode.value = 'passkey';
203
+ usePasskeyButton();
203
204
  } else if ( newRoute.hash === '#code' ) {
204
205
  cancelPendingWebAuthn('switch-to-code');
205
206
  confirmationMode.value = 'code';
package/dist/index.js CHANGED
@@ -73,7 +73,7 @@ export default class TwoFactorsAuthPlugin extends AdminForthPlugin {
73
73
  const jwt = this.adminforth.auth.issueJWT({ hash: hash }, 'MfaGrace', `${this.options.stepUpMfaGracePeriodSeconds}s`);
74
74
  //TODO: fix ts-ignore after releasing new version of adminforth with updated types
75
75
  //@ts-ignore
76
- this.adminforth.auth.setCustomCookie({ response: response, payload: { name: "TempSkip2FA_Modal_JWT", value: jwt, expirySeconds: this.options.stepUpMfaGracePeriodSeconds, httpOnly: true } });
76
+ this.adminforth.auth.setCustomCookie({ response: response, payload: { name: "TempSkip2FA_Modal_JWT", sessionBased: true, value: jwt, httpOnly: true } });
77
77
  }
78
78
  }
79
79
  else {
package/index.ts CHANGED
@@ -83,7 +83,7 @@ export default class TwoFactorsAuthPlugin extends AdminForthPlugin {
83
83
  const jwt = this.adminforth.auth.issueJWT({ hash: hash }, 'MfaGrace', `${this.options.stepUpMfaGracePeriodSeconds}s`);
84
84
  //TODO: fix ts-ignore after releasing new version of adminforth with updated types
85
85
  //@ts-ignore
86
- this.adminforth.auth.setCustomCookie({response: response, payload: {name: "TempSkip2FA_Modal_JWT", value: jwt, expirySeconds: this.options.stepUpMfaGracePeriodSeconds, httpOnly: true}});
86
+ this.adminforth.auth.setCustomCookie({response: response, payload: {name: "TempSkip2FA_Modal_JWT", sessionBased: true, value: jwt, httpOnly: true}});
87
87
  }
88
88
  } else {
89
89
  console.error("❗️❗️❗️ Cannot set step-up MFA grace cookie: response object is missing. You probably called verify() method without response parameter ❗️❗️❗️");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/two-factors-auth",
3
- "version": "2.10.10",
3
+ "version": "2.10.12",
4
4
  "description": "AdminForth plugin for two factors authentication",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",