@authowl/react 0.22.0 → 0.24.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 +11 -2
- package/dist/OrganizationListContent-BSGDHYAC.js +185 -0
- package/dist/OrganizationProfileContent-HJT33DMJ.js +451 -0
- package/dist/OrganizationSwitcherContent-2TJ76HZM.js +176 -0
- package/dist/PrivacyCenterContent-EQEXXSLA.js +204 -0
- package/dist/{TeamsSection-ZQDNMWV3.js → TeamsSection-VJTKS4KP.js} +8 -4
- package/dist/chunk-2HNQYORD.js +139 -0
- package/dist/chunk-7WIBXVGK.js +19 -0
- package/dist/chunk-IDMSHQ6V.js +106 -0
- package/dist/chunk-SAVEQ6RC.js +83 -0
- package/dist/{chunk-PUJV7S6G.js → chunk-TOVDZ2ZE.js} +93 -160
- package/dist/chunk-ZYCPC5DH.js +46 -0
- package/dist/index.cjs +5325 -4772
- package/dist/index.d.cts +48 -7
- package/dist/index.d.ts +48 -7
- package/dist/index.js +529 -1309
- package/dist/styles.css +58 -0
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AuthConfig, Locale, AuthOwlClient, PublicConfig, ConsentStatus, OrganizationInvitationDetails, OrganizationDetails, OrganizationMembership, HasParams, AuthUser, AuthClientError, InvitationRecipientHint, SessionState, Organization, AuthOwlErrorCode } from '@authowl/core';
|
|
2
|
+
import { AuthConfig, Locale, AuthOwlClient, PublicConfig, ConsentStatus, OrganizationInvitationDetails, OrganizationDetails, OrganizationMembership, HasParams, AuthUser, AuthClientError, InvitationRecipientHint, SessionState, Organization, AuthOwlErrorCode, LastUsedSignInMethod } from '@authowl/core';
|
|
3
3
|
export { AuthOwlError, AuthPasskey, ConsentStatus, HasParams, InvalidKeyError, Organization, OrganizationDetails, OrganizationInvitation, OrganizationMember, OrganizationMemberWithUser, OrganizationMembership, OrganizationRoleSummary, OrganizationTeam, OrganizationTeamMember, OrganizationUserInvitation, PublicConfig, RateLimitedError, createMembershipHas, membershipHas, membershipHasPermission, membershipHasTeam } from '@authowl/core';
|
|
4
4
|
|
|
5
5
|
type Appearance = {
|
|
@@ -78,6 +78,9 @@ declare function useAuthClient(): AuthOwlClient;
|
|
|
78
78
|
type UseAccountResult = AuthOwlClient['account'];
|
|
79
79
|
/** Signed-in account profile, credential, session, provider, and deletion actions. */
|
|
80
80
|
declare function useAccount(): UseAccountResult;
|
|
81
|
+
type UsePrivacyResult = AuthOwlClient['privacy'];
|
|
82
|
+
/** Signed-in privacy preferences and data-subject-rights actions. */
|
|
83
|
+
declare function usePrivacy(): UsePrivacyResult;
|
|
81
84
|
type UsePublicConfigResult = {
|
|
82
85
|
config: PublicConfig | null;
|
|
83
86
|
isLoading: boolean;
|
|
@@ -814,7 +817,7 @@ declare function SignOutButton({ children, redirectTo, onSignedOut, className }:
|
|
|
814
817
|
|
|
815
818
|
declare function UserButton(): React.JSX.Element | null;
|
|
816
819
|
|
|
817
|
-
declare const USER_PROFILE_SECTIONS: readonly ["profile", "email", "password", "social", "sessions", "passkeys", "mfa", "recovery", "danger"];
|
|
820
|
+
declare const USER_PROFILE_SECTIONS: readonly ["profile", "email", "password", "social", "sessions", "passkeys", "mfa", "recovery", "privacy", "danger"];
|
|
818
821
|
type UserProfileSection = (typeof USER_PROFILE_SECTIONS)[number];
|
|
819
822
|
|
|
820
823
|
type UserProfileSharedProps = {
|
|
@@ -840,11 +843,24 @@ type UserProfileProps = UserProfileSharedProps & ({
|
|
|
840
843
|
});
|
|
841
844
|
declare function UserProfile(props?: UserProfileProps): React.JSX.Element;
|
|
842
845
|
|
|
846
|
+
type PrivacyCenterProps = {
|
|
847
|
+
/** Optional class name on the privacy-center section. */
|
|
848
|
+
className?: string;
|
|
849
|
+
};
|
|
850
|
+
/**
|
|
851
|
+
* Managed consent and data-rights UI.
|
|
852
|
+
*
|
|
853
|
+
* The full center loads on demand because it is normally opened from account
|
|
854
|
+
* settings, keeping it out of an application's initial authentication bundle.
|
|
855
|
+
*/
|
|
856
|
+
declare function PrivacyCenter(props?: PrivacyCenterProps): React.JSX.Element;
|
|
857
|
+
|
|
843
858
|
type OrganizationSwitcherProps = {
|
|
844
859
|
showPersonalWorkspace?: boolean;
|
|
845
860
|
onOrganizationChange?: (organization: Organization | null) => void;
|
|
846
861
|
};
|
|
847
|
-
|
|
862
|
+
/** Organization workspace switcher, loaded when the host renders it. */
|
|
863
|
+
declare function OrganizationSwitcher(props?: OrganizationSwitcherProps): React.JSX.Element;
|
|
848
864
|
|
|
849
865
|
/**
|
|
850
866
|
* The one screen that turns an emailed organization invitation into a
|
|
@@ -868,7 +884,8 @@ declare function InvitationPrompt(): React.JSX.Element | null;
|
|
|
868
884
|
type OrganizationListProps = {
|
|
869
885
|
onOrganizationChange?: (organization: Organization | null) => void;
|
|
870
886
|
};
|
|
871
|
-
|
|
887
|
+
/** Organization directory and invitation management, loaded on demand. */
|
|
888
|
+
declare function OrganizationList(props?: OrganizationListProps): React.JSX.Element;
|
|
872
889
|
|
|
873
890
|
type CreateOrganizationProps = {
|
|
874
891
|
onCreated?: (organization: Organization) => void;
|
|
@@ -886,7 +903,11 @@ type OrganizationProfileProps = {
|
|
|
886
903
|
onDeleted?: (organization: OrganizationDetails) => void;
|
|
887
904
|
onLeft?: (organization: OrganizationDetails) => void;
|
|
888
905
|
};
|
|
889
|
-
|
|
906
|
+
/**
|
|
907
|
+
* Managed organization settings, loaded when the host renders this optional
|
|
908
|
+
* administration surface.
|
|
909
|
+
*/
|
|
910
|
+
declare function OrganizationProfile(props?: OrganizationProfileProps): React.JSX.Element;
|
|
890
911
|
|
|
891
912
|
type GoogleOneTapRuntimeErrorCode = 'script_load_failed' | 'api_unavailable' | 'configuration_conflict' | 'duplicate_instance' | 'prompt_failed';
|
|
892
913
|
|
|
@@ -901,7 +922,7 @@ type GoogleOneTapError = {
|
|
|
901
922
|
type GoogleOneTapProps = {
|
|
902
923
|
/** Disable prompting without unmounting the component. */
|
|
903
924
|
disabled?: boolean;
|
|
904
|
-
/**
|
|
925
|
+
/** Ask Google to include this nonce and verify the returned token carries the same value. */
|
|
905
926
|
nonce?: string;
|
|
906
927
|
/** Let eligible returning Google users sign in automatically. Defaults to false. */
|
|
907
928
|
autoSelect?: boolean;
|
|
@@ -924,4 +945,24 @@ type GoogleOneTapProps = {
|
|
|
924
945
|
/** Invisible, server-configured Google One Tap conversion helper. */
|
|
925
946
|
declare function GoogleOneTap({ disabled, nonce, autoSelect, cancelOnTapOutside, context, itpSupport, loginHint, hostedDomain, stateCookieDomain, scriptNonce, onSignedIn, onSkipped, onDismissed, onError, }: GoogleOneTapProps): null;
|
|
926
947
|
|
|
927
|
-
|
|
948
|
+
/**
|
|
949
|
+
* Which sign-in method last worked in this browser, for this project.
|
|
950
|
+
*
|
|
951
|
+
* Two kinds of method need different treatment, and conflating them is the bug
|
|
952
|
+
* this shape exists to avoid:
|
|
953
|
+
*
|
|
954
|
+
* completes in page password, email-OTP verification, passkey - observable
|
|
955
|
+
* success, so it is recorded when it happens.
|
|
956
|
+
*
|
|
957
|
+
* leaves the page social, SSO, magic link - the page that would observe
|
|
958
|
+
* success is one the browser navigates away from. The
|
|
959
|
+
* attempt is PARKED and promoted only when a session
|
|
960
|
+
* actually appears, so bouncing off a consent screen does
|
|
961
|
+
* not teach the form that the provider worked.
|
|
962
|
+
*
|
|
963
|
+
* Everything is per project and per browser, and never keyed by an identifier -
|
|
964
|
+
* see the core module for why that line matters.
|
|
965
|
+
*/
|
|
966
|
+
declare function useLastUsedSignInMethod(): LastUsedSignInMethod | null;
|
|
967
|
+
|
|
968
|
+
export { type Appearance, AuthLoaded, type AuthLoadedProps, AuthLoading, type AuthLoadingProps, AuthOwlBadge, type AuthOwlBadgeProps, AuthOwlBranding, type AuthOwlBrandingProps, AuthOwlProvider, type AuthOwlProviderProps, type AutofillHost, BackupCodesManager, type BackupCodesManagerProps, Bidi, type ConfigState, ConsentDocLinks, type ConsentDocLinksProps, ConsentGate, type ConsentGateProps, CreateOrganization, type CreateOrganizationProps, DEFAULT_BRAND_COLOR, EmailOtpForm, type EmailOtpFormProps, ForgotPassword, type ForgotPasswordProps, GoogleOneTap, type GoogleOneTapDismissReason, type GoogleOneTapError, type GoogleOneTapErrorCode, type GoogleOneTapProps, type GoogleOneTapSkipReason, InvitationPrompt, type InvitationPromptStatus, KNOWN_METHODS, type KnownMethod, MFAChallenge, type MFAChallengeProps, MFAEnrollment, type MFAEnrollmentProps, MFARequiredGate, type MFARequiredGateProps, MagicLinkForm, type MagicLinkFormProps, OrganizationList, type OrganizationListProps, OrganizationProfile, type OrganizationProfileProps, type OrganizationProfileSection, OrganizationSwitcher, type OrganizationSwitcherProps, PasskeyButton, type PasskeyButtonProps, PasskeyManager, type PasskeyManagerProps, PhoneOTP, type PhoneOTPProps, PrivacyCenter, type PrivacyCenterProps, Protect, type ProtectProps, ResetPassword, type ResetPasswordProps, SignIn, type SignInPlan, type SignInProps, SignOutButton, type SignOutButtonProps, SignUp, type SignUpProps, SignedIn, type SignedInProps, SignedOut, type SignedOutProps, SocialButtons, type SocialButtonsProps, Spinner, type UseAccountResult, type UseAuthResult, type UseConsentResult, type UseEmailVerificationResult, type UseMFAResult, type UseOrganizationInvitationResult, type UseOrganizationResult, type UsePasskeysResult, type UsePasswordResetResult, type UsePrivacyResult, type UsePublicConfigResult, type UseSignInResult, type UseSignOutResult, type UseSignUpResult, type UseUserResult, type UseWaitlistResult, UserButton, UserProfile, type UserProfileProps, type UserProfileSection, VerificationPending, type VerificationPendingProps, VerifyEmail, type VerifyEmailProps, Waitlist, type WaitlistProps, emailAutocomplete, resolveSignInMethods, useAccount, useAuth, useAuthClient, useAuthOwlContext, useConsent, useEmailVerification, useInvitationRecipientHint, useLastUsedSignInMethod, useLocale, useMFA, useOrganization, useOrganizationInvitation, usePasskeys, usePasswordReset, usePrivacy, usePublicConfig, useSession, useSignIn, useSignOut, useSignUp, useUser, useWaitlist };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AuthConfig, Locale, AuthOwlClient, PublicConfig, ConsentStatus, OrganizationInvitationDetails, OrganizationDetails, OrganizationMembership, HasParams, AuthUser, AuthClientError, InvitationRecipientHint, SessionState, Organization, AuthOwlErrorCode } from '@authowl/core';
|
|
2
|
+
import { AuthConfig, Locale, AuthOwlClient, PublicConfig, ConsentStatus, OrganizationInvitationDetails, OrganizationDetails, OrganizationMembership, HasParams, AuthUser, AuthClientError, InvitationRecipientHint, SessionState, Organization, AuthOwlErrorCode, LastUsedSignInMethod } from '@authowl/core';
|
|
3
3
|
export { AuthOwlError, AuthPasskey, ConsentStatus, HasParams, InvalidKeyError, Organization, OrganizationDetails, OrganizationInvitation, OrganizationMember, OrganizationMemberWithUser, OrganizationMembership, OrganizationRoleSummary, OrganizationTeam, OrganizationTeamMember, OrganizationUserInvitation, PublicConfig, RateLimitedError, createMembershipHas, membershipHas, membershipHasPermission, membershipHasTeam } from '@authowl/core';
|
|
4
4
|
|
|
5
5
|
type Appearance = {
|
|
@@ -78,6 +78,9 @@ declare function useAuthClient(): AuthOwlClient;
|
|
|
78
78
|
type UseAccountResult = AuthOwlClient['account'];
|
|
79
79
|
/** Signed-in account profile, credential, session, provider, and deletion actions. */
|
|
80
80
|
declare function useAccount(): UseAccountResult;
|
|
81
|
+
type UsePrivacyResult = AuthOwlClient['privacy'];
|
|
82
|
+
/** Signed-in privacy preferences and data-subject-rights actions. */
|
|
83
|
+
declare function usePrivacy(): UsePrivacyResult;
|
|
81
84
|
type UsePublicConfigResult = {
|
|
82
85
|
config: PublicConfig | null;
|
|
83
86
|
isLoading: boolean;
|
|
@@ -814,7 +817,7 @@ declare function SignOutButton({ children, redirectTo, onSignedOut, className }:
|
|
|
814
817
|
|
|
815
818
|
declare function UserButton(): React.JSX.Element | null;
|
|
816
819
|
|
|
817
|
-
declare const USER_PROFILE_SECTIONS: readonly ["profile", "email", "password", "social", "sessions", "passkeys", "mfa", "recovery", "danger"];
|
|
820
|
+
declare const USER_PROFILE_SECTIONS: readonly ["profile", "email", "password", "social", "sessions", "passkeys", "mfa", "recovery", "privacy", "danger"];
|
|
818
821
|
type UserProfileSection = (typeof USER_PROFILE_SECTIONS)[number];
|
|
819
822
|
|
|
820
823
|
type UserProfileSharedProps = {
|
|
@@ -840,11 +843,24 @@ type UserProfileProps = UserProfileSharedProps & ({
|
|
|
840
843
|
});
|
|
841
844
|
declare function UserProfile(props?: UserProfileProps): React.JSX.Element;
|
|
842
845
|
|
|
846
|
+
type PrivacyCenterProps = {
|
|
847
|
+
/** Optional class name on the privacy-center section. */
|
|
848
|
+
className?: string;
|
|
849
|
+
};
|
|
850
|
+
/**
|
|
851
|
+
* Managed consent and data-rights UI.
|
|
852
|
+
*
|
|
853
|
+
* The full center loads on demand because it is normally opened from account
|
|
854
|
+
* settings, keeping it out of an application's initial authentication bundle.
|
|
855
|
+
*/
|
|
856
|
+
declare function PrivacyCenter(props?: PrivacyCenterProps): React.JSX.Element;
|
|
857
|
+
|
|
843
858
|
type OrganizationSwitcherProps = {
|
|
844
859
|
showPersonalWorkspace?: boolean;
|
|
845
860
|
onOrganizationChange?: (organization: Organization | null) => void;
|
|
846
861
|
};
|
|
847
|
-
|
|
862
|
+
/** Organization workspace switcher, loaded when the host renders it. */
|
|
863
|
+
declare function OrganizationSwitcher(props?: OrganizationSwitcherProps): React.JSX.Element;
|
|
848
864
|
|
|
849
865
|
/**
|
|
850
866
|
* The one screen that turns an emailed organization invitation into a
|
|
@@ -868,7 +884,8 @@ declare function InvitationPrompt(): React.JSX.Element | null;
|
|
|
868
884
|
type OrganizationListProps = {
|
|
869
885
|
onOrganizationChange?: (organization: Organization | null) => void;
|
|
870
886
|
};
|
|
871
|
-
|
|
887
|
+
/** Organization directory and invitation management, loaded on demand. */
|
|
888
|
+
declare function OrganizationList(props?: OrganizationListProps): React.JSX.Element;
|
|
872
889
|
|
|
873
890
|
type CreateOrganizationProps = {
|
|
874
891
|
onCreated?: (organization: Organization) => void;
|
|
@@ -886,7 +903,11 @@ type OrganizationProfileProps = {
|
|
|
886
903
|
onDeleted?: (organization: OrganizationDetails) => void;
|
|
887
904
|
onLeft?: (organization: OrganizationDetails) => void;
|
|
888
905
|
};
|
|
889
|
-
|
|
906
|
+
/**
|
|
907
|
+
* Managed organization settings, loaded when the host renders this optional
|
|
908
|
+
* administration surface.
|
|
909
|
+
*/
|
|
910
|
+
declare function OrganizationProfile(props?: OrganizationProfileProps): React.JSX.Element;
|
|
890
911
|
|
|
891
912
|
type GoogleOneTapRuntimeErrorCode = 'script_load_failed' | 'api_unavailable' | 'configuration_conflict' | 'duplicate_instance' | 'prompt_failed';
|
|
892
913
|
|
|
@@ -901,7 +922,7 @@ type GoogleOneTapError = {
|
|
|
901
922
|
type GoogleOneTapProps = {
|
|
902
923
|
/** Disable prompting without unmounting the component. */
|
|
903
924
|
disabled?: boolean;
|
|
904
|
-
/**
|
|
925
|
+
/** Ask Google to include this nonce and verify the returned token carries the same value. */
|
|
905
926
|
nonce?: string;
|
|
906
927
|
/** Let eligible returning Google users sign in automatically. Defaults to false. */
|
|
907
928
|
autoSelect?: boolean;
|
|
@@ -924,4 +945,24 @@ type GoogleOneTapProps = {
|
|
|
924
945
|
/** Invisible, server-configured Google One Tap conversion helper. */
|
|
925
946
|
declare function GoogleOneTap({ disabled, nonce, autoSelect, cancelOnTapOutside, context, itpSupport, loginHint, hostedDomain, stateCookieDomain, scriptNonce, onSignedIn, onSkipped, onDismissed, onError, }: GoogleOneTapProps): null;
|
|
926
947
|
|
|
927
|
-
|
|
948
|
+
/**
|
|
949
|
+
* Which sign-in method last worked in this browser, for this project.
|
|
950
|
+
*
|
|
951
|
+
* Two kinds of method need different treatment, and conflating them is the bug
|
|
952
|
+
* this shape exists to avoid:
|
|
953
|
+
*
|
|
954
|
+
* completes in page password, email-OTP verification, passkey - observable
|
|
955
|
+
* success, so it is recorded when it happens.
|
|
956
|
+
*
|
|
957
|
+
* leaves the page social, SSO, magic link - the page that would observe
|
|
958
|
+
* success is one the browser navigates away from. The
|
|
959
|
+
* attempt is PARKED and promoted only when a session
|
|
960
|
+
* actually appears, so bouncing off a consent screen does
|
|
961
|
+
* not teach the form that the provider worked.
|
|
962
|
+
*
|
|
963
|
+
* Everything is per project and per browser, and never keyed by an identifier -
|
|
964
|
+
* see the core module for why that line matters.
|
|
965
|
+
*/
|
|
966
|
+
declare function useLastUsedSignInMethod(): LastUsedSignInMethod | null;
|
|
967
|
+
|
|
968
|
+
export { type Appearance, AuthLoaded, type AuthLoadedProps, AuthLoading, type AuthLoadingProps, AuthOwlBadge, type AuthOwlBadgeProps, AuthOwlBranding, type AuthOwlBrandingProps, AuthOwlProvider, type AuthOwlProviderProps, type AutofillHost, BackupCodesManager, type BackupCodesManagerProps, Bidi, type ConfigState, ConsentDocLinks, type ConsentDocLinksProps, ConsentGate, type ConsentGateProps, CreateOrganization, type CreateOrganizationProps, DEFAULT_BRAND_COLOR, EmailOtpForm, type EmailOtpFormProps, ForgotPassword, type ForgotPasswordProps, GoogleOneTap, type GoogleOneTapDismissReason, type GoogleOneTapError, type GoogleOneTapErrorCode, type GoogleOneTapProps, type GoogleOneTapSkipReason, InvitationPrompt, type InvitationPromptStatus, KNOWN_METHODS, type KnownMethod, MFAChallenge, type MFAChallengeProps, MFAEnrollment, type MFAEnrollmentProps, MFARequiredGate, type MFARequiredGateProps, MagicLinkForm, type MagicLinkFormProps, OrganizationList, type OrganizationListProps, OrganizationProfile, type OrganizationProfileProps, type OrganizationProfileSection, OrganizationSwitcher, type OrganizationSwitcherProps, PasskeyButton, type PasskeyButtonProps, PasskeyManager, type PasskeyManagerProps, PhoneOTP, type PhoneOTPProps, PrivacyCenter, type PrivacyCenterProps, Protect, type ProtectProps, ResetPassword, type ResetPasswordProps, SignIn, type SignInPlan, type SignInProps, SignOutButton, type SignOutButtonProps, SignUp, type SignUpProps, SignedIn, type SignedInProps, SignedOut, type SignedOutProps, SocialButtons, type SocialButtonsProps, Spinner, type UseAccountResult, type UseAuthResult, type UseConsentResult, type UseEmailVerificationResult, type UseMFAResult, type UseOrganizationInvitationResult, type UseOrganizationResult, type UsePasskeysResult, type UsePasswordResetResult, type UsePrivacyResult, type UsePublicConfigResult, type UseSignInResult, type UseSignOutResult, type UseSignUpResult, type UseUserResult, type UseWaitlistResult, UserButton, UserProfile, type UserProfileProps, type UserProfileSection, VerificationPending, type VerificationPendingProps, VerifyEmail, type VerifyEmailProps, Waitlist, type WaitlistProps, emailAutocomplete, resolveSignInMethods, useAccount, useAuth, useAuthClient, useAuthOwlContext, useConsent, useEmailVerification, useInvitationRecipientHint, useLastUsedSignInMethod, useLocale, useMFA, useOrganization, useOrganizationInvitation, usePasskeys, usePasswordReset, usePrivacy, usePublicConfig, useSession, useSignIn, useSignOut, useSignUp, useUser, useWaitlist };
|