@nauth-toolkit/recaptcha 0.2.1 → 0.2.3

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 +37 -7
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -2,13 +2,43 @@
2
2
 
3
3
  reCAPTCHA provider for [nauth-toolkit](https://nauth.dev).
4
4
 
5
- Integrates Google reCAPTCHA v3 and reCAPTCHA Enterprise into nauth-toolkit's authentication flows. Verifies CAPTCHA tokens server-side during signup, login, and other protected endpoints.
5
+ Integrates Google reCAPTCHA v2, v3, and reCAPTCHA Enterprise into nauth-toolkit's authentication flows. Verifies CAPTCHA tokens server-side during signup, login, and other protected endpoints.
6
6
 
7
- ## Supports
7
+ **[Documentation](https://nauth.dev/docs/guides/recaptcha)** · **[GitHub](https://github.com/noorixorg/nauth)**
8
8
 
9
- - **reCAPTCHA v3** — score-based bot detection
10
- - **reCAPTCHA Enterprise** — Google Cloud project-based verification with site keys
11
- - Configurable score thresholds
12
- - Per-action verification (signup, login, password reset)
9
+ > Part of [nauth-toolkit](https://www.npmjs.com/package/@nauth-toolkit/core). Requires `@nauth-toolkit/core`.
13
10
 
14
- **Docs:** [nauth.dev](https://nauth.dev) · **Examples:** [github.com/noorixorg/nauth](https://github.com/noorixorg/nauth) · **Live demo:** [demo.nauth.dev](https://demo.nauth.dev)
11
+ ---
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ npm install @nauth-toolkit/recaptcha
17
+ ```
18
+
19
+ ## Usage (reCAPTCHA v3)
20
+
21
+ ```typescript
22
+ import { RecaptchaV3Provider } from '@nauth-toolkit/recaptcha';
23
+
24
+ const authConfig = {
25
+ recaptcha: {
26
+ provider: new RecaptchaV3Provider({
27
+ secretKey: process.env.RECAPTCHA_SECRET_KEY,
28
+ }),
29
+ minimumScore: 0.5,
30
+ },
31
+ };
32
+ ```
33
+
34
+ ## Providers
35
+
36
+ - **RecaptchaV2Provider** — checkbox-based verification
37
+ - **RecaptchaV3Provider** — score-based bot detection (invisible)
38
+ - **RecaptchaEnterpriseProvider** — Google Cloud project-based verification with site keys
39
+ - Configurable minimum score thresholds
40
+ - Per-action score overrides (signup, login, password reset)
41
+
42
+ ---
43
+
44
+ Free to use. See [license](https://nauth.dev/docs/license).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nauth-toolkit/recaptcha",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "reCAPTCHA v3 and Enterprise provider for nauth-toolkit",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {},
40
40
  "peerDependencies": {
41
- "@nauth-toolkit/core": "^0.2.1",
41
+ "@nauth-toolkit/core": "^0.2.3",
42
42
  "@nestjs/common": "^9 || ^10 || ^11"
43
43
  },
44
44
  "peerDependenciesMeta": {