@authowl/react 0.24.4 → 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 +10 -1
- package/dist/{OrganizationListContent-BSGDHYAC.js → OrganizationListContent-HMRK4ZSI.js} +3 -3
- package/dist/{OrganizationProfileContent-HJT33DMJ.js → OrganizationProfileContent-7RM6OMLU.js} +3 -3
- package/dist/{OrganizationSwitcherContent-2TJ76HZM.js → OrganizationSwitcherContent-6G6ASVYZ.js} +2 -2
- package/dist/{TeamsSection-VJTKS4KP.js → TeamsSection-MXSBSO44.js} +1 -1
- package/dist/{chunk-SAVEQ6RC.js → chunk-KUNSGUZP.js} +4 -2
- package/dist/{chunk-2HNQYORD.js → chunk-R6WM64IM.js} +2 -2
- package/dist/{chunk-7WIBXVGK.js → chunk-TTBODVRM.js} +1 -1
- package/dist/index.cjs +919 -751
- package/dist/index.d.cts +174 -12
- package/dist/index.d.ts +174 -12
- package/dist/index.js +515 -348
- package/package.json +2 -2
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 />`, `<
|
|
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-
|
|
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-
|
|
12
|
+
} from "./chunk-R6WM64IM.js";
|
|
13
13
|
import {
|
|
14
14
|
useSubmitAction
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KUNSGUZP.js";
|
|
16
16
|
import {
|
|
17
17
|
Bidi,
|
|
18
18
|
FormError,
|
package/dist/{OrganizationProfileContent-HJT33DMJ.js → OrganizationProfileContent-7RM6OMLU.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
organizationRoleLabel
|
|
4
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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();
|
package/dist/{OrganizationSwitcherContent-2TJ76HZM.js → OrganizationSwitcherContent-6G6ASVYZ.js}
RENAMED
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
CreateOrganization,
|
|
8
8
|
OrganizationProfile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-R6WM64IM.js";
|
|
10
10
|
import {
|
|
11
11
|
useSubmitAction
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KUNSGUZP.js";
|
|
13
13
|
import {
|
|
14
14
|
FormError,
|
|
15
15
|
useAuthClient,
|
|
@@ -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
|
-
|
|
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-
|
|
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-
|
|
129
|
+
const module = await import("./OrganizationProfileContent-7RM6OMLU.js");
|
|
130
130
|
return { default: module.OrganizationProfileContent };
|
|
131
131
|
});
|
|
132
132
|
function OrganizationProfile(props = {}) {
|