protonfile-auth 1.6.0 → 1.6.1

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.
@@ -17,7 +17,7 @@ exports.default = (req, res) => __awaiter(void 0, void 0, void 0, function* () {
17
17
  const user = yield User_1.User.findOne({ email });
18
18
  if (!user)
19
19
  return res.sendStatus(403);
20
- const otp = yield OTP_1.OTP.findOne({ code, user_id: user.user_id });
20
+ const otp = yield OTP_1.OTP.findOne({ code, user_id: user.user_id, scope: 'registration' });
21
21
  if (!otp)
22
22
  return res.sendStatus(404);
23
23
  yield OTP_1.OTP.delete({ code: otp.code });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protonfile-auth",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "protonfile-auth",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",