@molecule/app-auth-modal-react 1.0.1 → 1.1.0

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 CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-08-04T01:50:06.179Z
6
+ Generated: 2026-08-17T05:34:54.179Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-auth-modal-react
@@ -75,6 +75,18 @@ interface AuthModalMountProps {
75
75
  * the default new-tab flow (+ focus-return refresh) applies.
76
76
  */
77
77
  onUpgradeIntercept?: (path: string) => void
78
+ /**
79
+ * Human-verification challenge rendered inside the modal's SIGNUP form — see
80
+ * {@link AuthModalProps.captchaSlot}. Pass it together with
81
+ * {@link AuthModalMountProps.captchaSolved} whenever the app's signup API
82
+ * requires a challenge token, otherwise the in-app signup POSTs without one
83
+ * while the standalone `/signup` page (which renders its own widget) works —
84
+ * a mismatch the user experiences as "complete the challenge" with no
85
+ * challenge on screen. Optional.
86
+ */
87
+ captchaSlot?: AuthModalProps['captchaSlot']
88
+ /** Whether {@link AuthModalMountProps.captchaSlot} is solved; `false` disables the signup submit. Defaults to `true`. */
89
+ captchaSolved?: AuthModalProps['captchaSolved']
78
90
  /** Override the auth path→mode map (defaults to `/login`,`/signup`). */
79
91
  authPaths?: Readonly<Record<string, AuthModalMode>>
80
92
  /** Override the upgrade paths opened in a new tab (defaults to `/pricing`,`/billing`). */
@@ -109,6 +121,29 @@ interface AuthModalProps {
109
121
  * still on the same page — e.g. claim guest projects, invalidate usage. Optional.
110
122
  */
111
123
  onAuthenticated?: () => void | Promise<void>
124
+ /**
125
+ * A human-verification challenge rendered inside the SIGNUP form, above the
126
+ * submit button (e.g. the app's Turnstile/hCaptcha widget). Login is not
127
+ * gated, so the slot is unmounted in login mode — which lets the widget clear
128
+ * its own token when the user switches tabs and re-issue a fresh one on the
129
+ * way back.
130
+ *
131
+ * The modal stays provider-agnostic: it renders the node and never inspects
132
+ * it. An app whose signup API requires a challenge MUST pass
133
+ * {@link AuthModalProps.captchaSolved} as well, or the form will submit
134
+ * without a token and the API will reject it.
135
+ *
136
+ * Optional — omitted (the default for apps with no challenge) the signup form
137
+ * is unchanged.
138
+ */
139
+ captchaSlot?: ReactNode
140
+ /**
141
+ * Whether the {@link AuthModalProps.captchaSlot} challenge is currently
142
+ * solved. `false` disables the signup submit, so the form cannot POST a
143
+ * missing/expired token. Defaults to `true` (no challenge → nothing to wait
144
+ * for). Ignored in login mode.
145
+ */
146
+ captchaSolved?: boolean
112
147
  }
113
148
  ```
114
149
 
@@ -136,6 +171,8 @@ function AuthModal({
136
171
  oauthConfig,
137
172
  onBeforeAuth,
138
173
  onAuthenticated,
174
+ captchaSlot,
175
+ captchaSolved = true,
139
176
  }: AuthModalProps): JSX.Element
140
177
  ```
141
178
 
@@ -154,6 +191,8 @@ function AuthModalMount({
154
191
  onAuthenticated,
155
192
  onUpgradeReturn,
156
193
  onUpgradeIntercept,
194
+ captchaSlot,
195
+ captchaSolved,
157
196
  authPaths = DEFAULT_AUTH_PATHS,
158
197
  upgradePaths = DEFAULT_UPGRADE_PATHS,
159
198
  }: AuthModalMountProps): JSX.Element
@@ -258,3 +297,12 @@ that render pricing in-place pass `onUpgradeIntercept` and own that UI
258
297
  `onAuthenticated`. The modal's `auth.modal.*` strings are homed in the
259
298
  `@molecule/app-locales-common` bond (79 languages), alongside the
260
299
  `auth.login.*` / `auth.signup.*` keys the modal also renders.
300
+
301
+ If the signup API requires a human-verification challenge (Turnstile /
302
+ hCaptcha), pass BOTH `captchaSlot` (the widget, rendered in the signup
303
+ form) and `captchaSolved` (which gates the submit). Rendering the widget
304
+ on the standalone `/signup` page alone is NOT enough: this modal is what
305
+ a `/signup` link actually opens, so the in-app signup would POST with no
306
+ token and the API would answer "complete the verification challenge"
307
+ while no challenge is on screen. Login is not gated, so the slot is
308
+ unmounted in login mode.
@@ -16,7 +16,7 @@
16
16
  *
17
17
  * @module
18
18
  */
19
- import { type JSX } from 'react';
19
+ import { type JSX, type ReactNode } from 'react';
20
20
  import { useOAuth } from '@molecule/app-react';
21
21
  import type { AuthModalMode } from './cta-intercept.js';
22
22
  /** Props for {@link AuthModal}. */
@@ -42,6 +42,29 @@ export interface AuthModalProps {
42
42
  * still on the same page — e.g. claim guest projects, invalidate usage. Optional.
43
43
  */
44
44
  onAuthenticated?: () => void | Promise<void>;
45
+ /**
46
+ * A human-verification challenge rendered inside the SIGNUP form, above the
47
+ * submit button (e.g. the app's Turnstile/hCaptcha widget). Login is not
48
+ * gated, so the slot is unmounted in login mode — which lets the widget clear
49
+ * its own token when the user switches tabs and re-issue a fresh one on the
50
+ * way back.
51
+ *
52
+ * The modal stays provider-agnostic: it renders the node and never inspects
53
+ * it. An app whose signup API requires a challenge MUST pass
54
+ * {@link AuthModalProps.captchaSolved} as well, or the form will submit
55
+ * without a token and the API will reject it.
56
+ *
57
+ * Optional — omitted (the default for apps with no challenge) the signup form
58
+ * is unchanged.
59
+ */
60
+ captchaSlot?: ReactNode;
61
+ /**
62
+ * Whether the {@link AuthModalProps.captchaSlot} challenge is currently
63
+ * solved. `false` disables the signup submit, so the form cannot POST a
64
+ * missing/expired token. Defaults to `true` (no challenge → nothing to wait
65
+ * for). Ignored in login mode.
66
+ */
67
+ captchaSolved?: boolean;
45
68
  }
46
69
  /**
47
70
  * The in-app auth modal: login/signup tabs rendered in a Modal overlay — the user authenticates without leaving the current page (no navigation, no lost work). Usually rendered via `AuthModalMount`, not directly.
@@ -49,7 +72,7 @@ export interface AuthModalProps {
49
72
  * @param props - {@link AuthModalProps}.
50
73
  * @returns The modal element (renders nothing when closed).
51
74
  */
52
- export declare function AuthModal({ open, onClose, initialMode, oauthConfig, onBeforeAuth, onAuthenticated, }: AuthModalProps): JSX.Element;
75
+ export declare function AuthModal({ open, onClose, initialMode, oauthConfig, onBeforeAuth, onAuthenticated, captchaSlot, captchaSolved, }: AuthModalProps): JSX.Element;
53
76
  export declare namespace AuthModal {
54
77
  var displayName: string;
55
78
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AuthModal.d.ts","sourceRoot":"","sources":["../src/AuthModal.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAuB,MAAM,OAAO,CAAA;AAMrD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAI9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AA0CvD,mCAAmC;AACnC,MAAM,WAAW,cAAc;IAC7B,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAA;IACb,4DAA4D;IAC5D,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,qDAAqD;IACrD,WAAW,CAAC,EAAE,aAAa,CAAA;IAC3B;;;OAGG;IACH,WAAW,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;IAC3C;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC7C;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,OAAO,EACP,WAAsB,EACtB,WAAW,EACX,YAAY,EACZ,eAAe,GAChB,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CA8P9B;yBArQe,SAAS"}
1
+ {"version":3,"file":"AuthModal.d.ts","sourceRoot":"","sources":["../src/AuthModal.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAA;AAMrE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAI9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AA0CvD,mCAAmC;AACnC,MAAM,WAAW,cAAc;IAC7B,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAA;IACb,4DAA4D;IAC5D,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,qDAAqD;IACrD,WAAW,CAAC,EAAE,aAAa,CAAA;IAC3B;;;OAGG;IACH,WAAW,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;IAC3C;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5C;;;;;;;;;;;;;;OAcG;IACH,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,OAAO,EACP,WAAsB,EACtB,WAAW,EACX,YAAY,EACZ,eAAe,EACf,WAAW,EACX,aAAoB,GACrB,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAoQ9B;yBA7Qe,SAAS"}
package/dist/AuthModal.js CHANGED
@@ -66,7 +66,7 @@ function useTouchFirstViewport() {
66
66
  * @param props - {@link AuthModalProps}.
67
67
  * @returns The modal element (renders nothing when closed).
68
68
  */
69
- export function AuthModal({ open, onClose, initialMode = 'signup', oauthConfig, onBeforeAuth, onAuthenticated, }) {
69
+ export function AuthModal({ open, onClose, initialMode = 'signup', oauthConfig, onBeforeAuth, onAuthenticated, captchaSlot, captchaSolved = true, }) {
70
70
  const cm = getClassMap();
71
71
  const isTouchFirst = useTouchFirstViewport();
72
72
  const [mode, setMode] = useState(initialMode);
@@ -180,7 +180,7 @@ export function AuthModal({ open, onClose, initialMode = 'signup', oauthConfig,
180
180
  defaultValue: 'Name (optional)',
181
181
  }), style: fieldStyle })), _jsx("input", { type: "email", value: email, onChange: (e) => setField('email', e.target.value), autoComplete: "email", autoFocus: true, required: true, "data-mol-id": "auth-modal-email", placeholder: t('auth.login.email', undefined, { defaultValue: 'Email' }), style: fieldStyle }), _jsx("input", { type: "password", value: password, onChange: (e) => setPassword(e.target.value), autoComplete: isSignup ? 'new-password' : 'current-password', required: true, "data-mol-id": "auth-modal-password", placeholder: t('auth.login.password', undefined, { defaultValue: 'Password' }), style: fieldStyle }), !isSignup && (_jsx("input", { type: "text", inputMode: "numeric", value: twoFactorToken, onChange: (e) => setTwoFactorToken(e.target.value), autoComplete: "one-time-code", "data-mol-id": "auth-modal-2fa", placeholder: t('auth.login.twoFactor', undefined, {
182
182
  defaultValue: '2FA code (if enabled)',
183
- }), style: fieldStyle })), _jsx(Button, { type: "submit", size: "lg", color: "success", disabled: busy, "data-mol-id": "auth-modal-submit", style: { width: '100%', marginTop: 2 }, children: busy
183
+ }), style: fieldStyle })), isSignup && captchaSlot && (_jsx("div", { "data-mol-id": "auth-modal-captcha", style: { display: 'grid', marginTop: 2 }, children: captchaSlot })), _jsx(Button, { type: "submit", size: "lg", color: "success", disabled: busy || (isSignup && !captchaSolved), "data-mol-id": "auth-modal-submit", style: { width: '100%', marginTop: 2 }, children: busy
184
184
  ? t('auth.modal.working', undefined, { defaultValue: 'Just a moment…' })
185
185
  : isSignup
186
186
  ? t('auth.login.signUp', undefined, { defaultValue: 'Sign up' })
@@ -43,6 +43,18 @@ export interface AuthModalMountProps {
43
43
  * the default new-tab flow (+ focus-return refresh) applies.
44
44
  */
45
45
  onUpgradeIntercept?: (path: string) => void;
46
+ /**
47
+ * Human-verification challenge rendered inside the modal's SIGNUP form — see
48
+ * {@link AuthModalProps.captchaSlot}. Pass it together with
49
+ * {@link AuthModalMountProps.captchaSolved} whenever the app's signup API
50
+ * requires a challenge token, otherwise the in-app signup POSTs without one
51
+ * while the standalone `/signup` page (which renders its own widget) works —
52
+ * a mismatch the user experiences as "complete the challenge" with no
53
+ * challenge on screen. Optional.
54
+ */
55
+ captchaSlot?: AuthModalProps['captchaSlot'];
56
+ /** Whether {@link AuthModalMountProps.captchaSlot} is solved; `false` disables the signup submit. Defaults to `true`. */
57
+ captchaSolved?: AuthModalProps['captchaSolved'];
46
58
  /** Override the auth path→mode map (defaults to `/login`,`/signup`). */
47
59
  authPaths?: Readonly<Record<string, AuthModalMode>>;
48
60
  /** Override the upgrade paths opened in a new tab (defaults to `/pricing`,`/billing`). */
@@ -54,7 +66,7 @@ export interface AuthModalMountProps {
54
66
  * @param props - {@link AuthModalMountProps}.
55
67
  * @returns The (lazily-mounted) auth modal element.
56
68
  */
57
- export declare function AuthModalMount({ oauthConfig, onBeforeAuth, onAuthenticated, onUpgradeReturn, onUpgradeIntercept, authPaths, upgradePaths, }: AuthModalMountProps): JSX.Element;
69
+ export declare function AuthModalMount({ oauthConfig, onBeforeAuth, onAuthenticated, onUpgradeReturn, onUpgradeIntercept, captchaSlot, captchaSolved, authPaths, upgradePaths, }: AuthModalMountProps): JSX.Element;
58
70
  export declare namespace AuthModalMount {
59
71
  var displayName: string;
60
72
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AuthModalMount.d.ts","sourceRoot":"","sources":["../src/AuthModalMount.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,GAAG,EAA4C,MAAM,OAAO,CAAA;AAI1E,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/D,OAAO,EACL,KAAK,aAAa,EAKnB,MAAM,oBAAoB,CAAA;AAE3B,wCAAwC;AACxC,MAAM,WAAW,mBAAmB;IAClC,gFAAgF;IAChF,WAAW,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;IAC1C,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,0EAA0E;IAC1E,eAAe,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5C;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,wEAAwE;IACxE,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAA;IACnD,0FAA0F;IAC1F,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACjC;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,YAAY,EACZ,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,SAA8B,EAC9B,YAAoC,GACrC,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CA8EnC;yBAtFe,cAAc"}
1
+ {"version":3,"file":"AuthModalMount.d.ts","sourceRoot":"","sources":["../src/AuthModalMount.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,GAAG,EAA4C,MAAM,OAAO,CAAA;AAI1E,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/D,OAAO,EACL,KAAK,aAAa,EAKnB,MAAM,oBAAoB,CAAA;AAE3B,wCAAwC;AACxC,MAAM,WAAW,mBAAmB;IAClC,gFAAgF;IAChF,WAAW,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;IAC1C,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,0EAA0E;IAC1E,eAAe,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5C;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;IAC3C,yHAAyH;IACzH,aAAa,CAAC,EAAE,cAAc,CAAC,eAAe,CAAC,CAAA;IAC/C,wEAAwE;IACxE,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAA;IACnD,0FAA0F;IAC1F,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACjC;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,YAAY,EACZ,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,SAA8B,EAC9B,YAAoC,GACrC,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAgFnC;yBA1Fe,cAAc"}
@@ -28,7 +28,7 @@ import { authModeForHref, DEFAULT_AUTH_PATHS, DEFAULT_UPGRADE_PATHS, upgradePath
28
28
  * @param props - {@link AuthModalMountProps}.
29
29
  * @returns The (lazily-mounted) auth modal element.
30
30
  */
31
- export function AuthModalMount({ oauthConfig, onBeforeAuth, onAuthenticated, onUpgradeReturn, onUpgradeIntercept, authPaths = DEFAULT_AUTH_PATHS, upgradePaths = DEFAULT_UPGRADE_PATHS, }) {
31
+ export function AuthModalMount({ oauthConfig, onBeforeAuth, onAuthenticated, onUpgradeReturn, onUpgradeIntercept, captchaSlot, captchaSolved, authPaths = DEFAULT_AUTH_PATHS, upgradePaths = DEFAULT_UPGRADE_PATHS, }) {
32
32
  const { refresh } = useAuth();
33
33
  const [open, setOpen] = useState(false);
34
34
  const [mode, setMode] = useState('signup');
@@ -91,6 +91,6 @@ export function AuthModalMount({ oauthConfig, onBeforeAuth, onAuthenticated, onU
91
91
  return () => document.removeEventListener('click', onClick, true);
92
92
  }, [openAuth, authPaths, upgradePaths, onUpgradeIntercept]);
93
93
  // Mounted only while open so the auth hooks don't run on every app render.
94
- return open ? (_jsx(AuthModal, { open: open, onClose: () => setOpen(false), initialMode: mode, oauthConfig: oauthConfig, onBeforeAuth: onBeforeAuth, onAuthenticated: onAuthenticated })) : (_jsx(_Fragment, {}));
94
+ return open ? (_jsx(AuthModal, { open: open, onClose: () => setOpen(false), initialMode: mode, oauthConfig: oauthConfig, onBeforeAuth: onBeforeAuth, onAuthenticated: onAuthenticated, captchaSlot: captchaSlot, captchaSolved: captchaSolved })) : (_jsx(_Fragment, {}));
95
95
  }
96
96
  AuthModalMount.displayName = 'AuthModalMount';
package/dist/index.d.ts CHANGED
@@ -38,6 +38,15 @@
38
38
  * `@molecule/app-locales-common` bond (79 languages), alongside the
39
39
  * `auth.login.*` / `auth.signup.*` keys the modal also renders.
40
40
  *
41
+ * If the signup API requires a human-verification challenge (Turnstile /
42
+ * hCaptcha), pass BOTH `captchaSlot` (the widget, rendered in the signup
43
+ * form) and `captchaSolved` (which gates the submit). Rendering the widget
44
+ * on the standalone `/signup` page alone is NOT enough: this modal is what
45
+ * a `/signup` link actually opens, so the in-app signup would POST with no
46
+ * token and the API would answer "complete the verification challenge"
47
+ * while no challenge is on screen. Login is not gated, so the slot is
48
+ * unmounted in login mode.
49
+ *
41
50
  * @module
42
51
  */
43
52
  export * from './AuthModal.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA"}
package/dist/index.js CHANGED
@@ -38,6 +38,15 @@
38
38
  * `@molecule/app-locales-common` bond (79 languages), alongside the
39
39
  * `auth.login.*` / `auth.signup.*` keys the modal also renders.
40
40
  *
41
+ * If the signup API requires a human-verification challenge (Turnstile /
42
+ * hCaptcha), pass BOTH `captchaSlot` (the widget, rendered in the signup
43
+ * form) and `captchaSolved` (which gates the submit). Rendering the widget
44
+ * on the standalone `/signup` page alone is NOT enough: this modal is what
45
+ * a `/signup` link actually opens, so the in-app signup would POST with no
46
+ * token and the API would answer "complete the verification challenge"
47
+ * while no challenge is on screen. Login is not gated, so the slot is
48
+ * unmounted in login mode.
49
+ *
41
50
  * @module
42
51
  */
43
52
  export * from './AuthModal.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-auth-modal-react",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "In-app login / signup modal + click-interceptor + popup OAuth — authenticate and upgrade without ever navigating away or losing work",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -48,8 +48,8 @@
48
48
  "@molecule/app-auth-shell-react": "1.0.1",
49
49
  "@molecule/app-i18n": "1.0.1",
50
50
  "@molecule/app-oauth-buttons-react": "1.0.1",
51
- "@molecule/app-react": "1.0.1",
52
- "@molecule/app-ui": "1.0.1",
51
+ "@molecule/app-react": "1.1.0",
52
+ "@molecule/app-ui": "1.1.0",
53
53
  "@molecule/app-ui-react": "1.0.1",
54
54
  "@testing-library/react": "16.3.2",
55
55
  "@types/node": "26.1.2",