@authowl/react 0.24.3 → 0.25.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
@@ -34,7 +34,8 @@ function Page() {
34
34
  **Components**: `<SignIn />`, `<SignUp />`, `<PrivacyCenter />`, `<PhoneOTP />`, `<SocialButtons />`, `<MagicLinkForm />`,
35
35
  `<EmailOtpForm />`, `<PasskeyButton />`, `<PasskeyManager />`, `<ForgotPassword />`,
36
36
  `<ResetPassword />`, `<VerifyEmail />`, `<VerificationPending />`, `<MFAEnrollment />`,
37
- `<MFAChallenge />`, `<Waitlist />`, `<ConsentGate />`, `<UserButton />`, `<SignOutButton />`,
37
+ `<MFAChallenge />`, `<Waitlist />`, `<ConsentGate />`, `<MFARequiredGate />`,
38
+ `<PasskeyOfferGate />`, `<UserButton />`, `<SignOutButton />`,
38
39
  `<SignedIn>`/`<SignedOut>`/`<Protect>`, `<AuthOwlBadge />`, `<UserProfile />`,
39
40
  `<OrganizationSwitcher />`, `<OrganizationList />`, `<CreateOrganization />`,
40
41
  `<OrganizationProfile />`, `<GoogleOneTap />`.
@@ -43,6 +44,14 @@ function Page() {
43
44
  `usePasskeys`, `usePasswordReset`, `useEmailVerification`, `useMFA`, `useConsent`,
44
45
  `usePublicConfig`, `useWaitlist`.
45
46
 
47
+ Wrap your signed-in application in `<PasskeyOfferGate>` to offer a passkey once,
48
+ just after someone signs in by another method. It never blocks: children render
49
+ immediately, and the offer appears only once the checks confirm the user could
50
+ actually use a passkey - the project allows registration, the page can reach the
51
+ relying party, the browser supports WebAuthn, the account is not two-factor
52
+ enrolled, and the server reports no passkey yet. A decline is remembered per
53
+ browser for thirty days; an enrolment ends the asking.
54
+
46
55
  When the environment's acquisition mode is `waitlist`, `<SignUp />` automatically
47
56
  renders email enrollment instead of account-creation methods. `<Waitlist />` is
48
57
  also available as a standalone surface. Both use the same public endpoint,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  organizationRoleLabel
4
- } from "./chunk-7WIBXVGK.js";
4
+ } from "./chunk-TTBODVRM.js";
5
5
  import {
6
6
  OrganizationModal,
7
7
  useOrganizationsResource
@@ -9,10 +9,10 @@ import {
9
9
  import {
10
10
  CreateOrganization,
11
11
  OrganizationProfile
12
- } from "./chunk-2HNQYORD.js";
12
+ } from "./chunk-R6WM64IM.js";
13
13
  import {
14
14
  useSubmitAction
15
- } from "./chunk-SAVEQ6RC.js";
15
+ } from "./chunk-KUNSGUZP.js";
16
16
  import {
17
17
  Bidi,
18
18
  FormError,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  organizationRoleLabel
4
- } from "./chunk-7WIBXVGK.js";
4
+ } from "./chunk-TTBODVRM.js";
5
5
  import {
6
6
  useOrganizationRoles
7
7
  } from "./chunk-ZYCPC5DH.js";
@@ -11,7 +11,7 @@ import {
11
11
  organizationRoles,
12
12
  organizationSlugFromName,
13
13
  useSubmitAction
14
- } from "./chunk-SAVEQ6RC.js";
14
+ } from "./chunk-KUNSGUZP.js";
15
15
  import {
16
16
  Bidi,
17
17
  Busy,
@@ -339,7 +339,7 @@ var SECTION_KEYS = {
339
339
  invitations: "organization.profile.nav.invitations",
340
340
  danger: "organization.profile.nav.danger"
341
341
  };
342
- var TeamsSection = React4.lazy(() => import("./TeamsSection-VJTKS4KP.js"));
342
+ var TeamsSection = React4.lazy(() => import("./TeamsSection-MXSBSO44.js"));
343
343
  function OrganizationProfileContent({ organizationId, defaultSection = "general", onDeleted, onLeft } = {}) {
344
344
  const t = useT();
345
345
  const toServerError = useServerError();
@@ -6,10 +6,10 @@ import {
6
6
  import {
7
7
  CreateOrganization,
8
8
  OrganizationProfile
9
- } from "./chunk-2HNQYORD.js";
9
+ } from "./chunk-R6WM64IM.js";
10
10
  import {
11
11
  useSubmitAction
12
- } from "./chunk-SAVEQ6RC.js";
12
+ } from "./chunk-KUNSGUZP.js";
13
13
  import {
14
14
  FormError,
15
15
  useAuthClient,
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  teamManagementCapabilities,
7
7
  useSubmitAction
8
- } from "./chunk-SAVEQ6RC.js";
8
+ } from "./chunk-KUNSGUZP.js";
9
9
  import {
10
10
  Bidi,
11
11
  Busy,
@@ -9,13 +9,15 @@ function useSubmitAction() {
9
9
  const [error, setError] = React.useState(null);
10
10
  const toMessage = useServerError();
11
11
  const run = React.useCallback(
12
- async (action, { failure, onSuccess, mapError, keepPendingOnSuccess }) => {
12
+ async (action, { failure, onSuccess, mapError, intercept, keepPendingOnSuccess }) => {
13
13
  setError(null);
14
14
  setPending(true);
15
15
  try {
16
16
  const res = await action();
17
17
  if (res?.error) {
18
- setError(mapError?.(res.error) ?? toMessage(res.error, failure));
18
+ if (!intercept?.(res.error)) {
19
+ setError(mapError?.(res.error) ?? toMessage(res.error, failure));
20
+ }
19
21
  setPending(false);
20
22
  return;
21
23
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  organizationSlugFromName,
3
3
  useSubmitAction
4
- } from "./chunk-SAVEQ6RC.js";
4
+ } from "./chunk-KUNSGUZP.js";
5
5
  import {
6
6
  Busy,
7
7
  FormError,
@@ -126,7 +126,7 @@ function CreateOrganization({ onCreated, title } = {}) {
126
126
  import * as React2 from "react";
127
127
  import { jsx as jsx2 } from "react/jsx-runtime";
128
128
  var OrganizationProfileContent = React2.lazy(async () => {
129
- const module = await import("./OrganizationProfileContent-HJT33DMJ.js");
129
+ const module = await import("./OrganizationProfileContent-7RM6OMLU.js");
130
130
  return { default: module.OrganizationProfileContent };
131
131
  });
132
132
  function OrganizationProfile(props = {}) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  organizationRoles
3
- } from "./chunk-SAVEQ6RC.js";
3
+ } from "./chunk-KUNSGUZP.js";
4
4
 
5
5
  // src/components/organization/role-label.ts
6
6
  function organizationRoleLabel(role, t) {