@javagt/express-easy-auth 1.0.2 → 1.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@javagt/express-easy-auth",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -312,7 +312,7 @@ router.post('/2fa/verify-setup', requireAuth, (req, res) => {
312
312
 
313
313
  authDb.prepare('UPDATE users SET totp_secret=?, totp_enabled=1 WHERE id=?').run(secret, req.session.userId);
314
314
 
315
- generateRecoveryCodes(10).then(({ plain: codes, hashes }) => {
315
+ generateRecoveryCodes(10).then(({ plain: codes, hashed: hashes }) => {
316
316
  const now = Date.now();
317
317
  const stmt = authDb.prepare('INSERT INTO recovery_codes (id, user_id, code_hash, created_at) VALUES (?, ?, ?, ?)');
318
318
  for (const hash of hashes) {