@adminforth/two-factors-auth 3.3.5 → 3.3.6

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
@@ -575,7 +575,7 @@ export default class TwoFactorsAuthPlugin extends AdminForthPlugin {
575
575
  return { status: 'ok', allowedLogin: true };
576
576
  }
577
577
  else {
578
- response.setStatus(403);
578
+ response.setStatus(403, "Wrong or expired TOTP code");
579
579
  return { error: 'Wrong or expired TOTP code', };
580
580
  }
581
581
  }
package/index.ts CHANGED
@@ -617,7 +617,7 @@ export default class TwoFactorsAuthPlugin extends AdminForthPlugin {
617
617
  this.adminforth.auth.setAuthCookie({expireInDuration: decoded.sessionDuration, response, username:decoded.userName, pk:decoded.pk})
618
618
  return { status: 'ok', allowedLogin: true }
619
619
  } else {
620
- response.setStatus(403);
620
+ response.setStatus(403, "Wrong or expired TOTP code");
621
621
  return {error: 'Wrong or expired TOTP code', }
622
622
  }
623
623
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/two-factors-auth",
3
- "version": "3.3.5",
3
+ "version": "3.3.6",
4
4
  "description": "AdminForth plugin for two factors authentication",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",