auth-verify 1.12.0 → 1.12.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/otp/index.js +3 -0
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "uuid": "^9.0.1"
16
16
  },
17
17
  "name": "auth-verify",
18
- "version": "1.12.0",
18
+ "version": "1.12.1",
19
19
  "description": "A simple Node.js library for sending and verifying OTP via email, SMS and Telegram bot. And generating TOTP codes and QR codes. And handling JWT with Cookies. And also handling passwordless logins with passkeys/webauth. And handling magiclink passwordless logins",
20
20
  "main": "index.js",
21
21
  "scripts": {
package/src/otp/index.js CHANGED
@@ -540,10 +540,13 @@ class OTPManager {
540
540
  // console.log(otpCode);
541
541
  if(this.senderConfig.via === 'email'){
542
542
  await this.#sendEmail(reciever, mailOption);
543
+ return true;
543
544
  }else if(this.senderConfig.via === 'sms'){
544
545
  await this.#sendSMS(reciever, mailOption);
546
+ return true;
545
547
  }else if(this.senderConfig.via === 'whatsapp'){
546
548
  await this.#sendWhatsApp(reciever, mailOption);
549
+ return true;
547
550
  }else {
548
551
  throw new Error("senderConfig.via should be 'email' or 'sms'")
549
552
  }