vr-commons 1.0.71 → 1.0.72
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/utils/verification.utils.js +13 -14
- package/package.json +1 -1
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.sendVerificationCode = exports.sendEmail = exports.sendSMS = exports.getOTPExpiry = exports.generateOTP = exports.getVerificationMethod = void 0;
|
|
7
|
-
const twilio_1 = __importDefault(require("twilio"));
|
|
8
7
|
const nodemailer_1 = __importDefault(require("nodemailer"));
|
|
9
8
|
// Get verification method from env
|
|
10
9
|
const getVerificationMethod = () => {
|
|
@@ -34,19 +33,19 @@ exports.getOTPExpiry = getOTPExpiry;
|
|
|
34
33
|
// SMS Sender
|
|
35
34
|
const sendSMS = async (phoneNumber, message) => {
|
|
36
35
|
try {
|
|
37
|
-
const accountSid = process.env.TWILIO_ACCOUNT_SID;
|
|
38
|
-
const authToken = process.env.TWILIO_AUTH_TOKEN;
|
|
39
|
-
const fromNumber = process.env.TWILIO_PHONE_NUMBER;
|
|
40
|
-
if (!accountSid || !authToken || !fromNumber) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
const client = (
|
|
45
|
-
await client.messages.create({
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
});
|
|
36
|
+
// const accountSid = process.env.TWILIO_ACCOUNT_SID;
|
|
37
|
+
// const authToken = process.env.TWILIO_AUTH_TOKEN;
|
|
38
|
+
// const fromNumber = process.env.TWILIO_PHONE_NUMBER;
|
|
39
|
+
// if (!accountSid || !authToken || !fromNumber) {
|
|
40
|
+
// console.error("Twilio credentials not configured");
|
|
41
|
+
// return false;
|
|
42
|
+
// }
|
|
43
|
+
// const client = twilio(accountSid, authToken);
|
|
44
|
+
// await client.messages.create({
|
|
45
|
+
// body: message,
|
|
46
|
+
// from: fromNumber,
|
|
47
|
+
// to: phoneNumber,
|
|
48
|
+
// });
|
|
50
49
|
console.log(`✅ SMS sent to ${phoneNumber}`);
|
|
51
50
|
return true;
|
|
52
51
|
}
|