@obfious/js 0.1.9 → 0.1.10

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/README.md +3 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -24,13 +24,13 @@ npm install @obfious/js
24
24
  import { Obfious } from "@obfious/js";
25
25
 
26
26
  const obfious = new Obfious({
27
+ keyId: process.env.OBFIOUS_KEY_ID,
28
+ secret: process.env.OBFIOUS_SECRET,
27
29
  includePaths: ["/api/"],
28
30
  });
29
31
 
30
- const creds = { keyId: process.env.OBFIOUS_KEY_ID, secret: process.env.OBFIOUS_SECRET };
31
-
32
32
  // In your request handler:
33
- const result = await obfious.protect(request, creds);
33
+ const result = await obfious.protect(request);
34
34
  if (result.response) return result.response;
35
35
  // result.deviceId is set when token is valid
36
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obfious/js",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Obfious anti-bot protection for JavaScript — CF Workers, Next.js, Express, Fastify, Lambda",
5
5
  "type": "module",
6
6
  "exports": {