@cedros/login-react 0.0.45 → 0.0.47
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 +32 -2
- package/dist/{AuthenticationSettings-bNQiNQ9g.cjs → AuthenticationSettings-BBOjHR6j.cjs} +1 -1
- package/dist/{AuthenticationSettings-bNQiNQ9g.cjs.map → AuthenticationSettings-BBOjHR6j.cjs.map} +1 -1
- package/dist/{AuthenticationSettings-BlYOmaEG.cjs → AuthenticationSettings-BXZRBZqc.cjs} +1 -1
- package/dist/{AuthenticationSettings-BlYOmaEG.cjs.map → AuthenticationSettings-BXZRBZqc.cjs.map} +1 -1
- package/dist/{AuthenticationSettings-BsuwWKbT.js → AuthenticationSettings-Bc_qT4nV.js} +1 -1
- package/dist/{AuthenticationSettings-BsuwWKbT.js.map → AuthenticationSettings-Bc_qT4nV.js.map} +1 -1
- package/dist/{AuthenticationSettings-DrHqtD7p.js → AuthenticationSettings-DXWCVZxS.js} +1 -1
- package/dist/{AuthenticationSettings-DrHqtD7p.js.map → AuthenticationSettings-DXWCVZxS.js.map} +1 -1
- package/dist/{AutosaveStatus-CZSwtgrL.cjs → AutosaveStatus-DfMPudTQ.cjs} +1 -1
- package/dist/AutosaveStatus-DfMPudTQ.cjs.map +1 -0
- package/dist/{AutosaveStatus-D-roPsRx.js → AutosaveStatus-DhGM3UUx.js} +103 -36
- package/dist/AutosaveStatus-DhGM3UUx.js.map +1 -0
- package/dist/{CreditSystemSettings-BTqZFn4K.js → CreditSystemSettings-B59-gOQT.js} +1 -1
- package/dist/{CreditSystemSettings-BTqZFn4K.js.map → CreditSystemSettings-B59-gOQT.js.map} +1 -1
- package/dist/{CreditSystemSettings-3R6crxvW.cjs → CreditSystemSettings-Badz4iAc.cjs} +1 -1
- package/dist/{CreditSystemSettings-3R6crxvW.cjs.map → CreditSystemSettings-Badz4iAc.cjs.map} +1 -1
- package/dist/{CreditSystemSettings-BskW_NKx.cjs → CreditSystemSettings-BxSoDwEi.cjs} +1 -1
- package/dist/{CreditSystemSettings-BskW_NKx.cjs.map → CreditSystemSettings-BxSoDwEi.cjs.map} +1 -1
- package/dist/{CreditSystemSettings-SL45GRH3.js → CreditSystemSettings-DxFpOeBW.js} +1 -1
- package/dist/{CreditSystemSettings-SL45GRH3.js.map → CreditSystemSettings-DxFpOeBW.js.map} +1 -1
- package/dist/EmailRegisterForm-ByYQ43yL.cjs +1 -0
- package/dist/EmailRegisterForm-ByYQ43yL.cjs.map +1 -0
- package/dist/EmailRegisterForm-DMUcNQT-.js +781 -0
- package/dist/EmailRegisterForm-DMUcNQT-.js.map +1 -0
- package/dist/{EmailSettings-XETM8FdS.js → EmailSettings-0y8D1QzF.js} +1 -1
- package/dist/{EmailSettings-XETM8FdS.js.map → EmailSettings-0y8D1QzF.js.map} +1 -1
- package/dist/{EmailSettings-BUAQji4I.js → EmailSettings-BA722mhf.js} +1 -1
- package/dist/{EmailSettings-BUAQji4I.js.map → EmailSettings-BA722mhf.js.map} +1 -1
- package/dist/{EmailSettings-CihElRkc.cjs → EmailSettings-BwZvdOYB.cjs} +1 -1
- package/dist/{EmailSettings-CihElRkc.cjs.map → EmailSettings-BwZvdOYB.cjs.map} +1 -1
- package/dist/{EmailSettings-CEC1rhrm.cjs → EmailSettings-DIjo3aJo.cjs} +1 -1
- package/dist/{EmailSettings-CEC1rhrm.cjs.map → EmailSettings-DIjo3aJo.cjs.map} +1 -1
- package/dist/{EmbeddedWalletSettings-CCT9DwmL.js → EmbeddedWalletSettings-BDbPpqWD.js} +1 -1
- package/dist/{EmbeddedWalletSettings-CCT9DwmL.js.map → EmbeddedWalletSettings-BDbPpqWD.js.map} +1 -1
- package/dist/{EmbeddedWalletSettings-MtwR81WH.cjs → EmbeddedWalletSettings-Db9a0D5l.cjs} +1 -1
- package/dist/{EmbeddedWalletSettings-MtwR81WH.cjs.map → EmbeddedWalletSettings-Db9a0D5l.cjs.map} +1 -1
- package/dist/{EmbeddedWalletSettings-B-083zu6.js → EmbeddedWalletSettings-MH4A6e6S.js} +1 -1
- package/dist/{EmbeddedWalletSettings-B-083zu6.js.map → EmbeddedWalletSettings-MH4A6e6S.js.map} +1 -1
- package/dist/{EmbeddedWalletSettings-DXIjansC.cjs → EmbeddedWalletSettings-T7LwbGok.cjs} +1 -1
- package/dist/{EmbeddedWalletSettings-DXIjansC.cjs.map → EmbeddedWalletSettings-T7LwbGok.cjs.map} +1 -1
- package/dist/GoogleLoginButton-DEwtBp56.cjs +1 -0
- package/dist/GoogleLoginButton-DEwtBp56.cjs.map +1 -0
- package/dist/{GoogleLoginButton-C1WNu7W3.js → GoogleLoginButton-DwyxvhnL.js} +82 -80
- package/dist/GoogleLoginButton-DwyxvhnL.js.map +1 -0
- package/dist/{PermissionsSection-mm9hfp-u.js → PermissionsSection-0oNHPZzL.js} +383 -415
- package/dist/PermissionsSection-0oNHPZzL.js.map +1 -0
- package/dist/PermissionsSection-CZsJuxo4.cjs +1 -0
- package/dist/PermissionsSection-CZsJuxo4.cjs.map +1 -0
- package/dist/{ServerSettings-DBpbRihl.js → ServerSettings-CwCkkU50.js} +1 -1
- package/dist/{ServerSettings-DBpbRihl.js.map → ServerSettings-CwCkkU50.js.map} +1 -1
- package/dist/{ServerSettings-24DA_BOI.js → ServerSettings-DKzWaqjC.js} +1 -1
- package/dist/{ServerSettings-24DA_BOI.js.map → ServerSettings-DKzWaqjC.js.map} +1 -1
- package/dist/{ServerSettings-BTEuzdrf.cjs → ServerSettings-DptlzQAu.cjs} +1 -1
- package/dist/{ServerSettings-BTEuzdrf.cjs.map → ServerSettings-DptlzQAu.cjs.map} +1 -1
- package/dist/{ServerSettings-BNc4LEs4.cjs → ServerSettings-j5Lu5D-R.cjs} +1 -1
- package/dist/{ServerSettings-BNc4LEs4.cjs.map → ServerSettings-j5Lu5D-R.cjs.map} +1 -1
- package/dist/SolanaLoginButton-2504p6cr.cjs +1 -0
- package/dist/SolanaLoginButton-2504p6cr.cjs.map +1 -0
- package/dist/SolanaLoginButton-C7Kc_m6n.js +234 -0
- package/dist/SolanaLoginButton-C7Kc_m6n.js.map +1 -0
- package/dist/{TeamSection-Km7EwLWD.cjs → TeamSection-DN8PEHH3.cjs} +1 -1
- package/dist/{TeamSection-Km7EwLWD.cjs.map → TeamSection-DN8PEHH3.cjs.map} +1 -1
- package/dist/{TeamSection-C_eODdLU.js → TeamSection-gUyP4YDM.js} +1 -1
- package/dist/{TeamSection-C_eODdLU.js.map → TeamSection-gUyP4YDM.js.map} +1 -1
- package/dist/{UsersSection-C1Tt0ePx.cjs → UsersSection-8wLuD0fr.cjs} +1 -1
- package/dist/{UsersSection-C1Tt0ePx.cjs.map → UsersSection-8wLuD0fr.cjs.map} +1 -1
- package/dist/{UsersSection-Ct_E-MBF.js → UsersSection-CnsFrG-6.js} +1 -1
- package/dist/{UsersSection-Ct_E-MBF.js.map → UsersSection-CnsFrG-6.js.map} +1 -1
- package/dist/{WebhookSettings-D9IsXZJN.js → WebhookSettings-2hlLLyGd.js} +1 -1
- package/dist/{WebhookSettings-D9IsXZJN.js.map → WebhookSettings-2hlLLyGd.js.map} +1 -1
- package/dist/{WebhookSettings-C6X_JJcD.cjs → WebhookSettings-CoEoVRRO.cjs} +1 -1
- package/dist/{WebhookSettings-C6X_JJcD.cjs.map → WebhookSettings-CoEoVRRO.cjs.map} +1 -1
- package/dist/{WebhookSettings-H1x6IKOj.cjs → WebhookSettings-DOaydSWQ.cjs} +1 -1
- package/dist/{WebhookSettings-H1x6IKOj.cjs.map → WebhookSettings-DOaydSWQ.cjs.map} +1 -1
- package/dist/{WebhookSettings-BhIwucKb.js → WebhookSettings-LS_wUimF.js} +1 -1
- package/dist/{WebhookSettings-BhIwucKb.js.map → WebhookSettings-LS_wUimF.js.map} +1 -1
- package/dist/admin-only.cjs +1 -1
- package/dist/admin-only.js +1 -1
- package/dist/email-only.cjs +1 -1
- package/dist/email-only.d.ts +10 -2
- package/dist/email-only.js +2 -2
- package/dist/google-only.cjs +1 -1
- package/dist/google-only.d.ts +7 -2
- package/dist/google-only.js +2 -2
- package/dist/index.cjs +12 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +182 -11
- package/dist/index.js +5221 -4657
- package/dist/index.js.map +1 -1
- package/dist/login-react.css +1 -1
- package/dist/{plugin-BwwJh2cY.cjs → plugin-DNFjEfYp.cjs} +1 -1
- package/dist/{plugin-BwwJh2cY.cjs.map → plugin-DNFjEfYp.cjs.map} +1 -1
- package/dist/{plugin-CetHtdLq.js → plugin-WYMrRNbz.js} +1 -1
- package/dist/{plugin-CetHtdLq.js.map → plugin-WYMrRNbz.js.map} +1 -1
- package/dist/solana-only.cjs +1 -1
- package/dist/solana-only.d.ts +6 -1
- package/dist/solana-only.js +2 -2
- package/dist/useAuth-2vgrAH-M.cjs +1 -0
- package/dist/useAuth-2vgrAH-M.cjs.map +1 -0
- package/dist/{useAuth-l-itM5am.js → useAuth-CNflw856.js} +465 -469
- package/dist/useAuth-CNflw856.js.map +1 -0
- package/dist/useServerFeatures-9_aNPaa6.cjs +1 -0
- package/dist/useServerFeatures-9_aNPaa6.cjs.map +1 -0
- package/dist/useServerFeatures-DSkYdan-.js +82 -0
- package/dist/useServerFeatures-DSkYdan-.js.map +1 -0
- package/dist/{useUsersStatsSummary-BGeh3RnI.js → useUsersStatsSummary-B4_RBEYy.js} +504 -442
- package/dist/useUsersStatsSummary-B4_RBEYy.js.map +1 -0
- package/dist/useUsersStatsSummary-CHRMrlk4.cjs +1 -0
- package/dist/useUsersStatsSummary-CHRMrlk4.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/AutosaveStatus-CZSwtgrL.cjs.map +0 -1
- package/dist/AutosaveStatus-D-roPsRx.js.map +0 -1
- package/dist/EmailRegisterForm-p2X5QP58.js +0 -750
- package/dist/EmailRegisterForm-p2X5QP58.js.map +0 -1
- package/dist/EmailRegisterForm-xFb6MaVA.cjs +0 -1
- package/dist/EmailRegisterForm-xFb6MaVA.cjs.map +0 -1
- package/dist/GoogleLoginButton-2zNTIKMm.cjs +0 -1
- package/dist/GoogleLoginButton-2zNTIKMm.cjs.map +0 -1
- package/dist/GoogleLoginButton-C1WNu7W3.js.map +0 -1
- package/dist/PermissionsSection-4zcE9Zs9.cjs +0 -1
- package/dist/PermissionsSection-4zcE9Zs9.cjs.map +0 -1
- package/dist/PermissionsSection-mm9hfp-u.js.map +0 -1
- package/dist/SolanaLoginButton-CqdzSSeJ.cjs +0 -1
- package/dist/SolanaLoginButton-CqdzSSeJ.cjs.map +0 -1
- package/dist/SolanaLoginButton-CyeX35eU.js +0 -232
- package/dist/SolanaLoginButton-CyeX35eU.js.map +0 -1
- package/dist/sanitization-Bo_tn-L2.cjs +0 -1
- package/dist/sanitization-Bo_tn-L2.cjs.map +0 -1
- package/dist/sanitization-CQ-H1MSg.js +0 -39
- package/dist/sanitization-CQ-H1MSg.js.map +0 -1
- package/dist/useAuth-B1yS_YiD.cjs +0 -1
- package/dist/useAuth-B1yS_YiD.cjs.map +0 -1
- package/dist/useAuth-l-itM5am.js.map +0 -1
- package/dist/useUsersStatsSummary-BGeh3RnI.js.map +0 -1
- package/dist/useUsersStatsSummary-DnsYtFGX.cjs +0 -1
- package/dist/useUsersStatsSummary-DnsYtFGX.cjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,19 @@ export declare interface AcceptInviteResponse {
|
|
|
24
24
|
role: OrgRole;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* A single access code record as returned by the server.
|
|
29
|
+
*/
|
|
30
|
+
export declare interface AccessCode {
|
|
31
|
+
id: string;
|
|
32
|
+
code: string;
|
|
33
|
+
codeType: string;
|
|
34
|
+
maxUses: number | null;
|
|
35
|
+
currentUses: number;
|
|
36
|
+
expiresAt: string | null;
|
|
37
|
+
createdAt: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
27
40
|
export declare function AccountSettings({ defaultTab, onClose, onPasswordChange, onTotpChange, onLinkGoogle, onLinkApple, onAddPasskey, onLinkSolana, className, }: AccountSettingsProps): JSX.Element;
|
|
28
41
|
|
|
29
42
|
export declare interface AccountSettingsProps extends ProfileTabProps, LinkedAccountsProps {
|
|
@@ -166,6 +179,25 @@ export declare interface AcknowledgeRecoveryRequest {
|
|
|
166
179
|
confirmed: boolean;
|
|
167
180
|
}
|
|
168
181
|
|
|
182
|
+
/**
|
|
183
|
+
* Admin access codes management panel.
|
|
184
|
+
*
|
|
185
|
+
* Inputs: className
|
|
186
|
+
* Outputs: CRUD for access codes; displays signup stats
|
|
187
|
+
* Errors: displayed inline
|
|
188
|
+
*/
|
|
189
|
+
export declare function AdminAccessCodes({ className }: AdminAccessCodesProps): JSX.Element;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Admin panel for managing access codes and viewing signup stats.
|
|
193
|
+
*
|
|
194
|
+
* Shows a stats bar, a create-code form, a filterable table of codes,
|
|
195
|
+
* and pagination.
|
|
196
|
+
*/
|
|
197
|
+
export declare interface AdminAccessCodesProps {
|
|
198
|
+
className?: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
169
201
|
/**
|
|
170
202
|
* Admin accreditation review queue.
|
|
171
203
|
*
|
|
@@ -800,7 +832,7 @@ export declare interface AllWalletsListResponse {
|
|
|
800
832
|
* />
|
|
801
833
|
* ```
|
|
802
834
|
*/
|
|
803
|
-
export declare function AppleLoginButton({ onSuccess, onError, className, variant, size, disabled, hideOnNonApple, }: AppleLoginButtonProps): JSX.Element | null;
|
|
835
|
+
export declare function AppleLoginButton({ onSuccess, onError, className, variant, size, disabled, hideOnNonApple, accessCode, }: AppleLoginButtonProps): JSX.Element | null;
|
|
804
836
|
|
|
805
837
|
export declare interface AppleLoginButtonProps {
|
|
806
838
|
onSuccess?: () => void;
|
|
@@ -816,6 +848,8 @@ export declare interface AppleLoginButtonProps {
|
|
|
816
848
|
* @default true
|
|
817
849
|
*/
|
|
818
850
|
hideOnNonApple?: boolean;
|
|
851
|
+
/** Access code forwarded to the server when this flow creates a new account. */
|
|
852
|
+
accessCode?: string;
|
|
819
853
|
}
|
|
820
854
|
|
|
821
855
|
/**
|
|
@@ -1079,6 +1113,8 @@ export declare interface CedrosLoginConfig {
|
|
|
1079
1113
|
theme?: ThemeMode;
|
|
1080
1114
|
/** CSS variable overrides for custom theming */
|
|
1081
1115
|
themeOverrides?: ThemeOverrides;
|
|
1116
|
+
/** Disable all default cedros styles. Use for custom design systems. */
|
|
1117
|
+
unstyled?: boolean;
|
|
1082
1118
|
/** API request timeout in ms. Default: 10000 */
|
|
1083
1119
|
requestTimeout?: number;
|
|
1084
1120
|
/** Retry attempts on transient errors. Default: 2 */
|
|
@@ -1406,7 +1442,7 @@ declare interface CustomTokenDefinition {
|
|
|
1406
1442
|
* Types and props interfaces for CedrosAdminDashboard
|
|
1407
1443
|
*/
|
|
1408
1444
|
/** Available dashboard sections */
|
|
1409
|
-
export declare type DashboardSection = 'users' | 'team' | 'referrals' | 'deposits' | 'withdrawals' | 'compliance' | 'accreditation-queue' | 'sanctions' | 'settings-wallet' | 'settings-auth' | 'settings-messaging' | 'settings-credits' | 'settings-compliance' | 'settings-referrals' | 'settings-server' | 'settings-images';
|
|
1445
|
+
export declare type DashboardSection = 'users' | 'team' | 'referrals' | 'deposits' | 'withdrawals' | 'compliance' | 'accreditation-queue' | 'sanctions' | 'signup-gating' | 'settings-wallet' | 'settings-auth' | 'settings-messaging' | 'settings-credits' | 'settings-compliance' | 'settings-referrals' | 'settings-signup' | 'settings-server' | 'settings-images';
|
|
1410
1446
|
|
|
1411
1447
|
declare type DeepPartial<T> = {
|
|
1412
1448
|
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
@@ -1720,12 +1756,18 @@ export declare interface EmailOptInConfig {
|
|
|
1720
1756
|
/**
|
|
1721
1757
|
* Email/password registration form
|
|
1722
1758
|
*/
|
|
1723
|
-
export declare function EmailRegisterForm({ onSuccess, onSwitchToLogin, className, }: EmailRegisterFormProps): JSX.Element;
|
|
1759
|
+
export declare function EmailRegisterForm({ onSuccess, onSwitchToLogin, className, accessCode: accessCodeProp, }: EmailRegisterFormProps): JSX.Element;
|
|
1724
1760
|
|
|
1725
1761
|
export declare interface EmailRegisterFormProps {
|
|
1726
1762
|
onSuccess?: () => void;
|
|
1727
1763
|
onSwitchToLogin?: () => void;
|
|
1728
1764
|
className?: string;
|
|
1765
|
+
/**
|
|
1766
|
+
* Access code value controlled by the parent (e.g. LoginForm).
|
|
1767
|
+
* When provided, the internal access code input is hidden and this value
|
|
1768
|
+
* is used directly. Allows LoginForm to show a single shared field.
|
|
1769
|
+
*/
|
|
1770
|
+
accessCode?: string;
|
|
1729
1771
|
}
|
|
1730
1772
|
|
|
1731
1773
|
export declare function EmailSettings({ className }: EmailSettingsProps): JSX.Element;
|
|
@@ -1967,7 +2009,7 @@ export declare function getTierForAmount(usd: number, config: DepositConfigRespo
|
|
|
1967
2009
|
/**
|
|
1968
2010
|
* Google OAuth login button
|
|
1969
2011
|
*/
|
|
1970
|
-
export declare function GoogleLoginButton({ onSuccess, onError, className, variant, size, disabled, }: GoogleLoginButtonProps): JSX.Element;
|
|
2012
|
+
export declare function GoogleLoginButton({ onSuccess, onError, className, variant, size, disabled, accessCode, }: GoogleLoginButtonProps): JSX.Element;
|
|
1971
2013
|
|
|
1972
2014
|
export declare interface GoogleLoginButtonProps {
|
|
1973
2015
|
onSuccess?: () => void;
|
|
@@ -1976,6 +2018,8 @@ export declare interface GoogleLoginButtonProps {
|
|
|
1976
2018
|
variant?: 'default' | 'outline';
|
|
1977
2019
|
size?: 'sm' | 'md' | 'lg';
|
|
1978
2020
|
disabled?: boolean;
|
|
2021
|
+
/** Access code forwarded to the server when this flow creates a new account. */
|
|
2022
|
+
accessCode?: string;
|
|
1979
2023
|
}
|
|
1980
2024
|
|
|
1981
2025
|
/**
|
|
@@ -2115,6 +2159,24 @@ export declare interface Invite {
|
|
|
2115
2159
|
expiresAt: string;
|
|
2116
2160
|
}
|
|
2117
2161
|
|
|
2162
|
+
/**
|
|
2163
|
+
* User-facing panel for generating and sharing invite codes.
|
|
2164
|
+
*
|
|
2165
|
+
* Displays the user's existing invite codes (copyable, with status and dates)
|
|
2166
|
+
* and provides a button to generate a new one.
|
|
2167
|
+
*
|
|
2168
|
+
* @example
|
|
2169
|
+
* ```tsx
|
|
2170
|
+
* <InviteCodePanel />
|
|
2171
|
+
* ```
|
|
2172
|
+
*/
|
|
2173
|
+
export declare function InviteCodePanel({ className }: InviteCodePanelProps): JSX.Element;
|
|
2174
|
+
|
|
2175
|
+
export declare interface InviteCodePanelProps {
|
|
2176
|
+
/** Additional CSS class */
|
|
2177
|
+
className?: string;
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2118
2180
|
/**
|
|
2119
2181
|
* Form for inviting new members to an organization.
|
|
2120
2182
|
*
|
|
@@ -2755,13 +2817,16 @@ export declare interface OtpInputProps {
|
|
|
2755
2817
|
className?: string;
|
|
2756
2818
|
}
|
|
2757
2819
|
|
|
2758
|
-
export declare function PasskeyLoginButton({ onSuccess, className, children, disabled, }: PasskeyLoginButtonProps): JSX.Element;
|
|
2820
|
+
export declare function PasskeyLoginButton({ onSuccess, onError, className, children, disabled, accessCode, }: PasskeyLoginButtonProps): JSX.Element;
|
|
2759
2821
|
|
|
2760
2822
|
export declare interface PasskeyLoginButtonProps {
|
|
2761
2823
|
onSuccess?: () => void;
|
|
2824
|
+
onError?: (error: Error) => void;
|
|
2762
2825
|
className?: string;
|
|
2763
2826
|
children?: ReactNode;
|
|
2764
2827
|
disabled?: boolean;
|
|
2828
|
+
/** Access code forwarded to the server when this flow creates a new account. */
|
|
2829
|
+
accessCode?: string;
|
|
2765
2830
|
}
|
|
2766
2831
|
|
|
2767
2832
|
/**
|
|
@@ -3318,6 +3383,14 @@ export declare interface ServerFeatures {
|
|
|
3318
3383
|
* **Cosmetic** — only controls admin dashboard tab visibility.
|
|
3319
3384
|
*/
|
|
3320
3385
|
cedrosPay: boolean;
|
|
3386
|
+
/**
|
|
3387
|
+
* Require an access code to register.
|
|
3388
|
+
*
|
|
3389
|
+
* **Enforced** — the server rejects registrations without a valid code
|
|
3390
|
+
* when this is enabled. The EmailRegisterForm shows an access code field
|
|
3391
|
+
* when this flag is true.
|
|
3392
|
+
*/
|
|
3393
|
+
signupAccessCodeRequired: boolean;
|
|
3321
3394
|
}
|
|
3322
3395
|
|
|
3323
3396
|
export declare function ServerSettings({ className }: ServerSettingsProps): JSX.Element;
|
|
@@ -3563,6 +3636,12 @@ export declare interface SignTransactionResponse {
|
|
|
3563
3636
|
pubkey: string;
|
|
3564
3637
|
}
|
|
3565
3638
|
|
|
3639
|
+
export declare function SignupSettings({ className }: SignupSettingsProps): JSX.Element;
|
|
3640
|
+
|
|
3641
|
+
export declare interface SignupSettingsProps {
|
|
3642
|
+
className?: string;
|
|
3643
|
+
}
|
|
3644
|
+
|
|
3566
3645
|
/**
|
|
3567
3646
|
* Solana configuration options
|
|
3568
3647
|
*/
|
|
@@ -3600,6 +3679,8 @@ export declare interface SolanaLoginButtonProps {
|
|
|
3600
3679
|
hideIfNoWallet?: boolean;
|
|
3601
3680
|
/** Called when the button's loading state changes (connecting, signing, etc.). */
|
|
3602
3681
|
onLoadingChange?: (loading: boolean) => void;
|
|
3682
|
+
/** Access code forwarded to the server when this flow creates a new account. */
|
|
3683
|
+
accessCode?: string;
|
|
3603
3684
|
/**
|
|
3604
3685
|
* Solana wallet adapter context. Pass this from @solana/wallet-adapter-react's useWallet().
|
|
3605
3686
|
* When provided, the component assumes a WalletProvider exists in the React tree and
|
|
@@ -4217,6 +4298,49 @@ declare interface UpdateUserRequest {
|
|
|
4217
4298
|
emailVerified?: boolean;
|
|
4218
4299
|
}
|
|
4219
4300
|
|
|
4301
|
+
/**
|
|
4302
|
+
* Hook for user-facing access code operations.
|
|
4303
|
+
*
|
|
4304
|
+
* Lets authenticated users generate invite codes and view the ones they've
|
|
4305
|
+
* already created.
|
|
4306
|
+
*
|
|
4307
|
+
* @example
|
|
4308
|
+
* ```tsx
|
|
4309
|
+
* const { codes, generateCode, fetchCodes, isLoading, error } = useAccessCodes();
|
|
4310
|
+
*
|
|
4311
|
+
* useEffect(() => { fetchCodes(); }, [fetchCodes]);
|
|
4312
|
+
*
|
|
4313
|
+
* const handleGenerate = async () => {
|
|
4314
|
+
* const code = await generateCode();
|
|
4315
|
+
* console.log(code.code);
|
|
4316
|
+
* };
|
|
4317
|
+
* ```
|
|
4318
|
+
*/
|
|
4319
|
+
export declare function useAccessCodes(): UseAccessCodesReturn;
|
|
4320
|
+
|
|
4321
|
+
/**
|
|
4322
|
+
* Return type for the useAccessCodes hook.
|
|
4323
|
+
*
|
|
4324
|
+
* Inputs: none (reads config from CedrosLoginProvider context)
|
|
4325
|
+
* Outputs: user's generated codes and mutation methods
|
|
4326
|
+
* Errors: all methods throw on failure and set `error` state
|
|
4327
|
+
* Invariants: `isLoading` is true only while a request is in flight
|
|
4328
|
+
*/
|
|
4329
|
+
export declare interface UseAccessCodesReturn {
|
|
4330
|
+
/** Generated codes by this user */
|
|
4331
|
+
codes: AccessCode[];
|
|
4332
|
+
/** Total number of codes on server */
|
|
4333
|
+
total: number;
|
|
4334
|
+
/** Generate a new invite code */
|
|
4335
|
+
generateCode: () => Promise<AccessCode>;
|
|
4336
|
+
/** Fetch user's generated codes */
|
|
4337
|
+
fetchCodes: () => Promise<void>;
|
|
4338
|
+
/** Whether a request is in progress */
|
|
4339
|
+
isLoading: boolean;
|
|
4340
|
+
/** Error from the last operation */
|
|
4341
|
+
error: Error | null;
|
|
4342
|
+
}
|
|
4343
|
+
|
|
4220
4344
|
/**
|
|
4221
4345
|
* Hook for accredited investor verification.
|
|
4222
4346
|
*
|
|
@@ -4395,7 +4519,8 @@ export declare interface UseAdminUsersReturn {
|
|
|
4395
4519
|
export declare function useAppleAuth(): UseAppleAuthReturn;
|
|
4396
4520
|
|
|
4397
4521
|
export declare interface UseAppleAuthReturn {
|
|
4398
|
-
|
|
4522
|
+
/** @param accessCode Optional signup access code, forwarded to the server on new registrations. */
|
|
4523
|
+
signIn: (accessCode?: string) => Promise<AuthResponse>;
|
|
4399
4524
|
isLoading: boolean;
|
|
4400
4525
|
isInitialized: boolean;
|
|
4401
4526
|
error: AuthError | null;
|
|
@@ -4523,6 +4648,45 @@ export declare function useAuthUI(): AuthUIContextValue;
|
|
|
4523
4648
|
*/
|
|
4524
4649
|
export declare function useCedrosLogin(): CedrosLoginContextValue;
|
|
4525
4650
|
|
|
4651
|
+
/**
|
|
4652
|
+
* Hook exposing the current cedros-login theme state.
|
|
4653
|
+
*
|
|
4654
|
+
* Use this to read theme values and apply them to custom components
|
|
4655
|
+
* that need to match the cedros-login theme. Follows the cedros-pay
|
|
4656
|
+
* `useCedrosTheme()` pattern.
|
|
4657
|
+
*
|
|
4658
|
+
* @example
|
|
4659
|
+
* ```tsx
|
|
4660
|
+
* function MyCustomCard() {
|
|
4661
|
+
* const { isDark, className, style } = useCedrosTheme();
|
|
4662
|
+
* return (
|
|
4663
|
+
* <div className={className} style={style}>
|
|
4664
|
+
* {isDark ? 'Dark mode' : 'Light mode'}
|
|
4665
|
+
* </div>
|
|
4666
|
+
* );
|
|
4667
|
+
* }
|
|
4668
|
+
* ```
|
|
4669
|
+
*/
|
|
4670
|
+
export declare function useCedrosTheme(): UseCedrosThemeReturn;
|
|
4671
|
+
|
|
4672
|
+
/**
|
|
4673
|
+
* Theme state exposed to consumers for custom theming.
|
|
4674
|
+
*/
|
|
4675
|
+
export declare interface UseCedrosThemeReturn {
|
|
4676
|
+
/** Current theme mode: 'light', 'dark', or 'auto' */
|
|
4677
|
+
mode: ThemeMode;
|
|
4678
|
+
/** Whether dark mode is currently active */
|
|
4679
|
+
isDark: boolean;
|
|
4680
|
+
/** CSS class name for the current theme (e.g. 'cedros-dark' or '') */
|
|
4681
|
+
className: string;
|
|
4682
|
+
/** Inline style object with CSS variable overrides */
|
|
4683
|
+
style: React.CSSProperties;
|
|
4684
|
+
/** Whether `unstyled` mode is active (no default cedros styles) */
|
|
4685
|
+
unstyled: boolean;
|
|
4686
|
+
/** The resolved theme overrides from config */
|
|
4687
|
+
overrides: ThemeOverrides | undefined;
|
|
4688
|
+
}
|
|
4689
|
+
|
|
4526
4690
|
/**
|
|
4527
4691
|
* Hook for managing user credentials (linked sign-in methods).
|
|
4528
4692
|
*
|
|
@@ -4664,7 +4828,7 @@ export declare function useEmailAuth(): UseEmailAuthReturn;
|
|
|
4664
4828
|
export declare interface UseEmailAuthReturn {
|
|
4665
4829
|
/** Login - may return mfaRequired if 2FA is enabled */
|
|
4666
4830
|
login: (email: string, password: string) => Promise<LoginResult>;
|
|
4667
|
-
register: (email: string, password: string, name?: string, referral?: string) => Promise<AuthResponse>;
|
|
4831
|
+
register: (email: string, password: string, name?: string, referral?: string, accessCode?: string) => Promise<AuthResponse>;
|
|
4668
4832
|
isLoading: boolean;
|
|
4669
4833
|
error: AuthError | null;
|
|
4670
4834
|
clearError: () => void;
|
|
@@ -4706,7 +4870,8 @@ export declare interface UseEmailAuthReturn {
|
|
|
4706
4870
|
export declare function useGoogleAuth(): UseGoogleAuthReturn;
|
|
4707
4871
|
|
|
4708
4872
|
export declare interface UseGoogleAuthReturn {
|
|
4709
|
-
|
|
4873
|
+
/** @param accessCode Optional signup access code, forwarded to the server on new registrations. */
|
|
4874
|
+
signIn: (accessCode?: string) => Promise<AuthResponse>;
|
|
4710
4875
|
isLoading: boolean;
|
|
4711
4876
|
isInitialized: boolean;
|
|
4712
4877
|
error: AuthError | null;
|
|
@@ -5457,7 +5622,8 @@ export declare function useSolanaAuth(): UseSolanaAuthReturn;
|
|
|
5457
5622
|
|
|
5458
5623
|
export declare interface UseSolanaAuthReturn {
|
|
5459
5624
|
requestChallenge: (publicKey: string) => Promise<ChallengeResponse>;
|
|
5460
|
-
|
|
5625
|
+
/** @param accessCode Optional signup access code, forwarded to the server on new registrations. */
|
|
5626
|
+
signIn: (publicKey: string, signature: string, message: string, accessCode?: string) => Promise<AuthResponse>;
|
|
5461
5627
|
isLoading: boolean;
|
|
5462
5628
|
error: AuthError | null;
|
|
5463
5629
|
clearError: () => void;
|
|
@@ -5868,8 +6034,11 @@ export declare interface UseWebAuthnReturn {
|
|
|
5868
6034
|
isLoading: boolean;
|
|
5869
6035
|
error: AuthError | null;
|
|
5870
6036
|
clearError: () => void;
|
|
5871
|
-
/**
|
|
5872
|
-
|
|
6037
|
+
/**
|
|
6038
|
+
* Unified passkey flow: tries discoverable auth first, falls back to signup if no passkey exists.
|
|
6039
|
+
* @param accessCode Optional signup access code forwarded to the server when creating a new account.
|
|
6040
|
+
*/
|
|
6041
|
+
continueWithPasskey: (accessCode?: string) => Promise<AuthResponse>;
|
|
5873
6042
|
/** Start a server-managed WebAuthn authentication ceremony (login). */
|
|
5874
6043
|
authenticatePasskey: (params?: {
|
|
5875
6044
|
email?: string;
|
|
@@ -5886,6 +6055,8 @@ export declare interface UseWebAuthnReturn {
|
|
|
5886
6055
|
email?: string;
|
|
5887
6056
|
name?: string;
|
|
5888
6057
|
label?: string;
|
|
6058
|
+
/** Optional signup access code forwarded to the server. */
|
|
6059
|
+
accessCode?: string;
|
|
5889
6060
|
}) => Promise<AuthResponse>;
|
|
5890
6061
|
}
|
|
5891
6062
|
|