angelos 1.0.1 → 1.0.2
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/README.md +16 -3
- package/package.json +17 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
#Angelos
|
|
2
2
|
|
|
3
3
|
Zero-cost, inbound WhatsApp OTP authentication for Node.js.
|
|
4
4
|
|
|
@@ -31,7 +31,7 @@ User Browser Your Server Meta Cloud API
|
|
|
31
31
|
## Installation
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
npm install
|
|
34
|
+
npm install angelos
|
|
35
35
|
```
|
|
36
36
|
Requires Node.js 18.0.0 or higher.
|
|
37
37
|
|
|
@@ -184,4 +184,17 @@ export default router;
|
|
|
184
184
|
## API Reference
|
|
185
185
|
|
|
186
186
|
### `new WhatsAppOtpVerifier(config)`
|
|
187
|
-
|
|
187
|
+
|
|
188
|
+
Creates a verifier instance bound to a specific Meta WhatsApp Business number.
|
|
189
|
+
|
|
190
|
+
**Parameters** (`config: Config`):
|
|
191
|
+
- `businessPhoneNumber: string` – Your registered WhatsApp Business phone number in **E.164** format (e.g. `"15550616140"` or `"+15550616140"`).
|
|
192
|
+
- `webhookVerifyToken: string` – Token you set in the Meta App dashboard; used for the GET verification challenge during webhook registration.
|
|
193
|
+
- `appSecret?: string` – **Optional** Meta App Secret. When provided the verifier will validate the `X‑Hub‑Signature‑256` header on incoming webhook POSTs.
|
|
194
|
+
- `storage?: StorageAdapter` – key‑value store used to keep OTP sessions. For production you should supply a Redis, DynamoDB, etc. implementation that matches the `StorageAdapter` interface.
|
|
195
|
+
- `defaultTtlSeconds?: number` – **Optional** default time‑to‑live for OTP sessions (seconds). Defaults to `180` (3 minutes) if not supplied.
|
|
196
|
+
|
|
197
|
+
The constructor validates the TTL values and will throw a `RangeError` if they fall outside the allowed range (30 – 3600 seconds).
|
|
198
|
+
|
|
199
|
+
**Returns** an instance of `WhatsAppOtpVerifier` ready to be used with the methods described below.
|
|
200
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angelos",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Frictionless WhatsApp QR-based phone verification engine for Node.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -45,5 +45,21 @@
|
|
|
45
45
|
"node": ">=18.0.0"
|
|
46
46
|
},
|
|
47
47
|
"author": "Hartejsingh Sandhu",
|
|
48
|
+
"keywords": [
|
|
49
|
+
"whatsapp",
|
|
50
|
+
"whatsapp-auth",
|
|
51
|
+
"whatsapp-otp",
|
|
52
|
+
"otp-verification",
|
|
53
|
+
"phone-verification",
|
|
54
|
+
"authentication",
|
|
55
|
+
"auth",
|
|
56
|
+
"qr-code-login",
|
|
57
|
+
"deep-link",
|
|
58
|
+
"meta-cloud-api",
|
|
59
|
+
"webhook",
|
|
60
|
+
"zero-cost-otp",
|
|
61
|
+
"inbound-sms-alternative",
|
|
62
|
+
"typescript"
|
|
63
|
+
],
|
|
48
64
|
"license": "MIT"
|
|
49
65
|
}
|