@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 +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
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",
|
|
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",
|
|
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 ❗️❗️❗️");
|