@adminforth/two-factors-auth 2.10.10 → 2.10.11

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/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.11",
4
4
  "description": "AdminForth plugin for two factors authentication",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",