@firebase-oss/ui-react 0.0.1 → 0.0.2-exp.6bf0c31
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/dist/index.cjs +9 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1131 -151
- package/dist/index.d.ts +1131 -151
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -5,43 +5,32 @@ import * as zod_v4_core from 'zod/v4/core';
|
|
|
5
5
|
import * as zod from 'zod';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import * as _tanstack_react_form from '@tanstack/react-form';
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
8
|
+
import { UserCredential, FactorId, RecaptchaVerifier, MultiFactorInfo, TotpSecret, User, OAuthProvider, FacebookAuthProvider, GithubAuthProvider, GoogleAuthProvider, TwitterAuthProvider, AuthProvider } from 'firebase/auth';
|
|
9
|
+
import { ButtonVariant } from '@firebase-oss/ui-styles';
|
|
10
10
|
import * as _firebase_oss_ui_core from '@firebase-oss/ui-core';
|
|
11
11
|
import { CountryData, CountryCode, FirebaseUIStore } from '@firebase-oss/ui-core';
|
|
12
|
-
import { ButtonVariant } from '@firebase-oss/ui-styles';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Copyright 2025 Google LLC
|
|
16
|
-
*
|
|
17
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
18
|
-
* you may not use this file except in compliance with the License.
|
|
19
|
-
* You may obtain a copy of the License at
|
|
20
|
-
*
|
|
21
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
-
*
|
|
23
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
24
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
25
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
26
|
-
* See the License for the specific language governing permissions and
|
|
27
|
-
* limitations under the License.
|
|
28
|
-
*/
|
|
29
|
-
type PolicyURL = string | URL;
|
|
30
|
-
interface PolicyProps {
|
|
31
|
-
termsOfServiceUrl: PolicyURL;
|
|
32
|
-
privacyPolicyUrl: PolicyURL;
|
|
33
|
-
onNavigate?: (url: PolicyURL) => void;
|
|
34
|
-
}
|
|
35
|
-
declare const PolicyContext: react.Context<PolicyProps | undefined>;
|
|
36
|
-
declare function Policies(): react_jsx_runtime.JSX.Element | null;
|
|
37
12
|
|
|
13
|
+
/** Props for the EmailLinkAuthForm component. */
|
|
38
14
|
type EmailLinkAuthFormProps = {
|
|
15
|
+
/** Callback function called when the sign-in link email is sent. */
|
|
39
16
|
onEmailSent?: () => void;
|
|
17
|
+
/** Callback function called when sign-in is completed via the email link. */
|
|
40
18
|
onSignIn?: (credential: UserCredential) => void;
|
|
41
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Creates a memoized action function for sending a sign-in link to an email address.
|
|
22
|
+
*
|
|
23
|
+
* @returns A callback function that sends a sign-in link to the specified email address.
|
|
24
|
+
*/
|
|
42
25
|
declare function useEmailLinkAuthFormAction(): ({ email }: {
|
|
43
26
|
email: string;
|
|
44
27
|
}) => Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Creates a form hook for email link authentication.
|
|
30
|
+
*
|
|
31
|
+
* @param onSuccess - Optional callback function called when the sign-in link email is sent.
|
|
32
|
+
* @returns A form instance configured for email link authentication.
|
|
33
|
+
*/
|
|
45
34
|
declare function useEmailLinkAuthForm(onSuccess?: EmailLinkAuthFormProps["onEmailSent"]): _tanstack_react_form.AppFieldExtendedReactFormApi<{
|
|
46
35
|
email: string;
|
|
47
36
|
}, _tanstack_react_form.FormValidateOrFn<{
|
|
@@ -54,9 +43,9 @@ declare function useEmailLinkAuthForm(onSuccess?: EmailLinkAuthFormProps["onEmai
|
|
|
54
43
|
email: zod.ZodEmail;
|
|
55
44
|
}, zod_v4_core.$strip>, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
56
45
|
email: string;
|
|
57
|
-
}> | undefined,
|
|
58
|
-
email:
|
|
59
|
-
},
|
|
46
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
47
|
+
email: string;
|
|
48
|
+
}> | undefined, ({ value }: {
|
|
60
49
|
value: {
|
|
61
50
|
email: string;
|
|
62
51
|
};
|
|
@@ -71,17 +60,33 @@ declare function useEmailLinkAuthForm(onSuccess?: EmailLinkAuthFormProps["onEmai
|
|
|
71
60
|
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
72
61
|
email: string;
|
|
73
62
|
}> | undefined, unknown, {
|
|
74
|
-
readonly Input: ({ children, before, label, action, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
63
|
+
readonly Input: ({ children, before, label, action, description, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
75
64
|
label: string;
|
|
76
65
|
before?: react.ReactNode;
|
|
77
66
|
action?: react.ReactNode;
|
|
67
|
+
description?: react.ReactNode;
|
|
78
68
|
}>) => react_jsx_runtime.JSX.Element;
|
|
79
69
|
}, {
|
|
80
70
|
readonly SubmitButton: (props: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
81
71
|
readonly ErrorMessage: () => react_jsx_runtime.JSX.Element;
|
|
82
72
|
readonly Action: ({ className, ...props }: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
83
73
|
}>;
|
|
74
|
+
/**
|
|
75
|
+
* Hook that automatically completes the email link sign-in process when the component mounts.
|
|
76
|
+
*
|
|
77
|
+
* Checks if the current URL contains a valid email link sign-in link and completes the authentication.
|
|
78
|
+
*
|
|
79
|
+
* @param onSignIn - Optional callback function called when sign-in is completed.
|
|
80
|
+
*/
|
|
84
81
|
declare function useEmailLinkAuthFormCompleteSignIn(onSignIn?: EmailLinkAuthFormProps["onSignIn"]): void;
|
|
82
|
+
/**
|
|
83
|
+
* A form component for email link authentication.
|
|
84
|
+
*
|
|
85
|
+
* Sends a sign-in link to the user's email address and automatically completes sign-in
|
|
86
|
+
* if the user arrives via an email link.
|
|
87
|
+
*
|
|
88
|
+
* @returns The email link auth form component.
|
|
89
|
+
*/
|
|
85
90
|
declare function EmailLinkAuthForm({ onEmailSent, onSignIn }: EmailLinkAuthFormProps): react_jsx_runtime.JSX.Element;
|
|
86
91
|
|
|
87
92
|
/**
|
|
@@ -99,13 +104,27 @@ declare function EmailLinkAuthForm({ onEmailSent, onSignIn }: EmailLinkAuthFormP
|
|
|
99
104
|
* See the License for the specific language governing permissions and
|
|
100
105
|
* limitations under the License.
|
|
101
106
|
*/
|
|
107
|
+
/** Props for the ForgotPasswordAuthForm component. */
|
|
102
108
|
type ForgotPasswordAuthFormProps = {
|
|
109
|
+
/** Callback function called when the password reset email is sent. */
|
|
103
110
|
onPasswordSent?: () => void;
|
|
111
|
+
/** Callback function called when the back to sign in link is clicked. */
|
|
104
112
|
onBackToSignInClick?: () => void;
|
|
105
113
|
};
|
|
114
|
+
/**
|
|
115
|
+
* Creates a memoized action function for sending a password reset email.
|
|
116
|
+
*
|
|
117
|
+
* @returns A callback function that sends a password reset email to the specified address.
|
|
118
|
+
*/
|
|
106
119
|
declare function useForgotPasswordAuthFormAction(): ({ email }: {
|
|
107
120
|
email: string;
|
|
108
121
|
}) => Promise<void>;
|
|
122
|
+
/**
|
|
123
|
+
* Creates a form hook for forgot password authentication.
|
|
124
|
+
*
|
|
125
|
+
* @param onSuccess - Optional callback function called when the password reset email is sent.
|
|
126
|
+
* @returns A form instance configured for forgot password.
|
|
127
|
+
*/
|
|
109
128
|
declare function useForgotPasswordAuthForm(onSuccess?: ForgotPasswordAuthFormProps["onPasswordSent"]): _tanstack_react_form.AppFieldExtendedReactFormApi<{
|
|
110
129
|
email: string;
|
|
111
130
|
}, _tanstack_react_form.FormValidateOrFn<{
|
|
@@ -118,9 +137,9 @@ declare function useForgotPasswordAuthForm(onSuccess?: ForgotPasswordAuthFormPro
|
|
|
118
137
|
email: zod.ZodEmail;
|
|
119
138
|
}, zod_v4_core.$strip>, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
120
139
|
email: string;
|
|
121
|
-
}> | undefined,
|
|
122
|
-
email:
|
|
123
|
-
},
|
|
140
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
141
|
+
email: string;
|
|
142
|
+
}> | undefined, ({ value }: {
|
|
124
143
|
value: {
|
|
125
144
|
email: string;
|
|
126
145
|
};
|
|
@@ -135,27 +154,91 @@ declare function useForgotPasswordAuthForm(onSuccess?: ForgotPasswordAuthFormPro
|
|
|
135
154
|
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
136
155
|
email: string;
|
|
137
156
|
}> | undefined, unknown, {
|
|
138
|
-
readonly Input: ({ children, before, label, action, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
157
|
+
readonly Input: ({ children, before, label, action, description, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
139
158
|
label: string;
|
|
140
159
|
before?: react.ReactNode;
|
|
141
160
|
action?: react.ReactNode;
|
|
161
|
+
description?: react.ReactNode;
|
|
142
162
|
}>) => react_jsx_runtime.JSX.Element;
|
|
143
163
|
}, {
|
|
144
164
|
readonly SubmitButton: (props: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
145
165
|
readonly ErrorMessage: () => react_jsx_runtime.JSX.Element;
|
|
146
166
|
readonly Action: ({ className, ...props }: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
147
167
|
}>;
|
|
168
|
+
/**
|
|
169
|
+
* A form component for requesting a password reset email.
|
|
170
|
+
*
|
|
171
|
+
* Displays a success message after the email is sent.
|
|
172
|
+
*
|
|
173
|
+
* @returns The forgot password form component.
|
|
174
|
+
*/
|
|
148
175
|
declare function ForgotPasswordAuthForm({ onBackToSignInClick, onPasswordSent }: ForgotPasswordAuthFormProps): react_jsx_runtime.JSX.Element;
|
|
149
176
|
|
|
177
|
+
/** Props for the MultiFactorAuthAssertionForm component. */
|
|
178
|
+
type MultiFactorAuthAssertionFormProps = {
|
|
179
|
+
/** Optional callback function called when multi-factor assertion is successful. */
|
|
180
|
+
onSuccess?: (credential: UserCredential) => void;
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Hook that cleans up the multi-factor resolver when the component unmounts.
|
|
184
|
+
*
|
|
185
|
+
* Ensures the resolver is cleared from the UI state to prevent stale state.
|
|
186
|
+
*/
|
|
187
|
+
declare function useMultiFactorAssertionCleanup(): void;
|
|
188
|
+
/**
|
|
189
|
+
* A form component for multi-factor authentication assertion.
|
|
190
|
+
*
|
|
191
|
+
* Displays the appropriate MFA form (SMS or TOTP) based on the available hints.
|
|
192
|
+
* If only one hint is available, it is automatically selected.
|
|
193
|
+
*
|
|
194
|
+
* @returns The multi-factor auth assertion form component.
|
|
195
|
+
* @throws {Error} Throws an error if no multi-factor resolver is available.
|
|
196
|
+
*/
|
|
197
|
+
declare function MultiFactorAuthAssertionForm(props: MultiFactorAuthAssertionFormProps): react_jsx_runtime.JSX.Element;
|
|
198
|
+
|
|
199
|
+
type Hint = (typeof FactorId)[keyof typeof FactorId];
|
|
200
|
+
/** Props for the MultiFactorAuthEnrollmentForm component. */
|
|
201
|
+
type MultiFactorAuthEnrollmentFormProps = {
|
|
202
|
+
/** Optional callback function called when enrollment is successful. */
|
|
203
|
+
onEnrollment?: () => void;
|
|
204
|
+
/** Optional array of factor IDs to allow enrollment for. Defaults to TOTP and PHONE. */
|
|
205
|
+
hints?: Hint[];
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* A form component for multi-factor authentication enrollment.
|
|
209
|
+
*
|
|
210
|
+
* Displays the appropriate MFA enrollment form (SMS or TOTP) based on the provided hints.
|
|
211
|
+
* If only one hint is provided, it is automatically selected.
|
|
212
|
+
*
|
|
213
|
+
* @returns The multi-factor auth enrollment form component.
|
|
214
|
+
* @throws {Error} Throws an error if no hints are provided or if an unknown hint type is encountered.
|
|
215
|
+
*/
|
|
216
|
+
declare function MultiFactorAuthEnrollmentForm(props: MultiFactorAuthEnrollmentFormProps): react_jsx_runtime.JSX.Element;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Creates a memoized action function for verifying a phone number.
|
|
220
|
+
*
|
|
221
|
+
* @returns A callback function that verifies a phone number using the provided reCAPTCHA verifier.
|
|
222
|
+
*/
|
|
150
223
|
declare function usePhoneNumberFormAction(): ({ phoneNumber, recaptchaVerifier }: {
|
|
151
224
|
phoneNumber: string;
|
|
152
225
|
recaptchaVerifier: RecaptchaVerifier;
|
|
153
226
|
}) => Promise<string>;
|
|
227
|
+
/** Options for the phone number form hook. */
|
|
154
228
|
type UsePhoneNumberForm = {
|
|
229
|
+
/** The reCAPTCHA verifier instance. */
|
|
155
230
|
recaptchaVerifier: RecaptchaVerifier;
|
|
231
|
+
/** Callback function called when phone verification is successful. */
|
|
156
232
|
onSuccess: (verificationId: string) => void;
|
|
233
|
+
/** Optional function to format the phone number before verification. */
|
|
157
234
|
formatPhoneNumber?: (phoneNumber: string) => string;
|
|
158
235
|
};
|
|
236
|
+
/**
|
|
237
|
+
* Creates a form hook for phone number verification.
|
|
238
|
+
*
|
|
239
|
+
* @param options - The phone number form options.
|
|
240
|
+
* @returns A form instance configured for phone number input and verification.
|
|
241
|
+
*/
|
|
159
242
|
declare function usePhoneNumberForm({ recaptchaVerifier, onSuccess, formatPhoneNumber }: UsePhoneNumberForm): _tanstack_react_form.AppFieldExtendedReactFormApi<{
|
|
160
243
|
phoneNumber: string;
|
|
161
244
|
}, _tanstack_react_form.FormValidateOrFn<{
|
|
@@ -168,9 +251,9 @@ declare function usePhoneNumberForm({ recaptchaVerifier, onSuccess, formatPhoneN
|
|
|
168
251
|
phoneNumber: zod.ZodString;
|
|
169
252
|
}, zod_v4_core.$strip>, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
170
253
|
phoneNumber: string;
|
|
171
|
-
}> | undefined,
|
|
172
|
-
phoneNumber:
|
|
173
|
-
},
|
|
254
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
255
|
+
phoneNumber: string;
|
|
256
|
+
}> | undefined, ({ value }: {
|
|
174
257
|
value: {
|
|
175
258
|
phoneNumber: string;
|
|
176
259
|
};
|
|
@@ -185,24 +268,39 @@ declare function usePhoneNumberForm({ recaptchaVerifier, onSuccess, formatPhoneN
|
|
|
185
268
|
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
186
269
|
phoneNumber: string;
|
|
187
270
|
}> | undefined, unknown, {
|
|
188
|
-
readonly Input: ({ children, before, label, action, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
271
|
+
readonly Input: ({ children, before, label, action, description, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
189
272
|
label: string;
|
|
190
273
|
before?: react.ReactNode;
|
|
191
274
|
action?: react.ReactNode;
|
|
275
|
+
description?: react.ReactNode;
|
|
192
276
|
}>) => react_jsx_runtime.JSX.Element;
|
|
193
277
|
}, {
|
|
194
278
|
readonly SubmitButton: (props: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
195
279
|
readonly ErrorMessage: () => react_jsx_runtime.JSX.Element;
|
|
196
280
|
readonly Action: ({ className, ...props }: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
197
281
|
}>;
|
|
282
|
+
/**
|
|
283
|
+
* Creates a memoized action function for verifying a phone verification code.
|
|
284
|
+
*
|
|
285
|
+
* @returns A callback function that confirms the phone number using the verification ID and code.
|
|
286
|
+
*/
|
|
198
287
|
declare function useVerifyPhoneNumberFormAction(): ({ verificationId, verificationCode }: {
|
|
199
288
|
verificationId: string;
|
|
200
289
|
verificationCode: string;
|
|
201
290
|
}) => Promise<UserCredential>;
|
|
291
|
+
/** Options for the verify phone number form hook. */
|
|
202
292
|
type UseVerifyPhoneNumberForm = {
|
|
293
|
+
/** The verification ID from the phone verification step. */
|
|
203
294
|
verificationId: string;
|
|
295
|
+
/** Callback function called when verification is successful. */
|
|
204
296
|
onSuccess: (credential: UserCredential) => void;
|
|
205
297
|
};
|
|
298
|
+
/**
|
|
299
|
+
* Creates a form hook for phone verification code input.
|
|
300
|
+
*
|
|
301
|
+
* @param options - The verify phone number form options.
|
|
302
|
+
* @returns A form instance configured for verification code input.
|
|
303
|
+
*/
|
|
206
304
|
declare function useVerifyPhoneNumberForm({ verificationId, onSuccess }: UseVerifyPhoneNumberForm): _tanstack_react_form.AppFieldExtendedReactFormApi<{
|
|
207
305
|
verificationId: string;
|
|
208
306
|
verificationCode: string;
|
|
@@ -221,10 +319,10 @@ declare function useVerifyPhoneNumberForm({ verificationId, onSuccess }: UseVeri
|
|
|
221
319
|
}, zod_v4_core.$strip>, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
222
320
|
verificationId: string;
|
|
223
321
|
verificationCode: string;
|
|
224
|
-
}> | undefined,
|
|
225
|
-
verificationId:
|
|
226
|
-
verificationCode:
|
|
227
|
-
},
|
|
322
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
323
|
+
verificationId: string;
|
|
324
|
+
verificationCode: string;
|
|
325
|
+
}> | undefined, ({ value }: {
|
|
228
326
|
value: {
|
|
229
327
|
verificationId: string;
|
|
230
328
|
verificationCode: string;
|
|
@@ -244,30 +342,55 @@ declare function useVerifyPhoneNumberForm({ verificationId, onSuccess }: UseVeri
|
|
|
244
342
|
verificationId: string;
|
|
245
343
|
verificationCode: string;
|
|
246
344
|
}> | undefined, unknown, {
|
|
247
|
-
readonly Input: ({ children, before, label, action, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
345
|
+
readonly Input: ({ children, before, label, action, description, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
248
346
|
label: string;
|
|
249
347
|
before?: react.ReactNode;
|
|
250
348
|
action?: react.ReactNode;
|
|
349
|
+
description?: react.ReactNode;
|
|
251
350
|
}>) => react_jsx_runtime.JSX.Element;
|
|
252
351
|
}, {
|
|
253
352
|
readonly SubmitButton: (props: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
254
353
|
readonly ErrorMessage: () => react_jsx_runtime.JSX.Element;
|
|
255
354
|
readonly Action: ({ className, ...props }: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
256
355
|
}>;
|
|
356
|
+
/** Props for the PhoneAuthForm component. */
|
|
257
357
|
type PhoneAuthFormProps = {
|
|
358
|
+
/** Optional callback function called when sign-in is successful. */
|
|
258
359
|
onSignIn?: (credential: UserCredential) => void;
|
|
259
360
|
};
|
|
361
|
+
/**
|
|
362
|
+
* A form component for phone authentication.
|
|
363
|
+
*
|
|
364
|
+
* Handles the two-step process: first entering the phone number, then verifying the SMS code.
|
|
365
|
+
*
|
|
366
|
+
* @returns The phone auth form component.
|
|
367
|
+
*/
|
|
260
368
|
declare function PhoneAuthForm(props: PhoneAuthFormProps): react_jsx_runtime.JSX.Element;
|
|
261
369
|
|
|
370
|
+
/** Props for the SignInAuthForm component. */
|
|
262
371
|
type SignInAuthFormProps = {
|
|
372
|
+
/** Callback function called when sign-in is successful. */
|
|
263
373
|
onSignIn?: (credential: UserCredential) => void;
|
|
374
|
+
/** Callback function called when the forgot password link is clicked. */
|
|
264
375
|
onForgotPasswordClick?: () => void;
|
|
376
|
+
/** Callback function called when the sign up link is clicked. */
|
|
265
377
|
onSignUpClick?: () => void;
|
|
266
378
|
};
|
|
379
|
+
/**
|
|
380
|
+
* Creates a memoized action function for signing in with email and password.
|
|
381
|
+
*
|
|
382
|
+
* @returns A callback function that signs in a user with email and password.
|
|
383
|
+
*/
|
|
267
384
|
declare function useSignInAuthFormAction(): ({ email, password }: {
|
|
268
385
|
email: string;
|
|
269
386
|
password: string;
|
|
270
387
|
}) => Promise<UserCredential>;
|
|
388
|
+
/**
|
|
389
|
+
* Creates a form hook for sign-in authentication.
|
|
390
|
+
*
|
|
391
|
+
* @param onSuccess - Optional callback function called when sign-in is successful.
|
|
392
|
+
* @returns A form instance configured for sign-in.
|
|
393
|
+
*/
|
|
271
394
|
declare function useSignInAuthForm(onSuccess?: SignInAuthFormProps["onSignIn"]): _tanstack_react_form.AppFieldExtendedReactFormApi<{
|
|
272
395
|
email: string;
|
|
273
396
|
password: string;
|
|
@@ -286,10 +409,10 @@ declare function useSignInAuthForm(onSuccess?: SignInAuthFormProps["onSignIn"]):
|
|
|
286
409
|
}, zod_v4_core.$strip>, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
287
410
|
email: string;
|
|
288
411
|
password: string;
|
|
289
|
-
}> | undefined,
|
|
290
|
-
email:
|
|
291
|
-
password:
|
|
292
|
-
},
|
|
412
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
413
|
+
email: string;
|
|
414
|
+
password: string;
|
|
415
|
+
}> | undefined, ({ value }: {
|
|
293
416
|
value: {
|
|
294
417
|
email: string;
|
|
295
418
|
password: string;
|
|
@@ -309,28 +432,53 @@ declare function useSignInAuthForm(onSuccess?: SignInAuthFormProps["onSignIn"]):
|
|
|
309
432
|
email: string;
|
|
310
433
|
password: string;
|
|
311
434
|
}> | undefined, unknown, {
|
|
312
|
-
readonly Input: ({ children, before, label, action, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
435
|
+
readonly Input: ({ children, before, label, action, description, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
313
436
|
label: string;
|
|
314
437
|
before?: react.ReactNode;
|
|
315
438
|
action?: react.ReactNode;
|
|
439
|
+
description?: react.ReactNode;
|
|
316
440
|
}>) => react_jsx_runtime.JSX.Element;
|
|
317
441
|
}, {
|
|
318
442
|
readonly SubmitButton: (props: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
319
443
|
readonly ErrorMessage: () => react_jsx_runtime.JSX.Element;
|
|
320
444
|
readonly Action: ({ className, ...props }: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
321
445
|
}>;
|
|
446
|
+
/**
|
|
447
|
+
* A form component for signing in with email and password.
|
|
448
|
+
*
|
|
449
|
+
* @returns The sign-in form component.
|
|
450
|
+
*/
|
|
322
451
|
declare function SignInAuthForm({ onSignIn, onForgotPasswordClick, onSignUpClick }: SignInAuthFormProps): react_jsx_runtime.JSX.Element;
|
|
323
452
|
|
|
453
|
+
/**
|
|
454
|
+
* Checks if the requireDisplayName behavior is enabled.
|
|
455
|
+
*
|
|
456
|
+
* @returns True if display name is required, false otherwise.
|
|
457
|
+
*/
|
|
324
458
|
declare function useRequireDisplayName(): boolean;
|
|
459
|
+
/** Props for the SignUpAuthForm component. */
|
|
325
460
|
type SignUpAuthFormProps = {
|
|
461
|
+
/** Callback function called when sign-up is successful. */
|
|
326
462
|
onSignUp?: (credential: UserCredential) => void;
|
|
327
|
-
|
|
463
|
+
/** Callback function called when the sign in link is clicked. */
|
|
464
|
+
onSignInClick?: () => void;
|
|
328
465
|
};
|
|
466
|
+
/**
|
|
467
|
+
* Creates a memoized action function for signing up with email and password.
|
|
468
|
+
*
|
|
469
|
+
* @returns A callback function that creates a new user account with email and password.
|
|
470
|
+
*/
|
|
329
471
|
declare function useSignUpAuthFormAction(): ({ email, password, displayName }: {
|
|
330
472
|
email: string;
|
|
331
473
|
password: string;
|
|
332
474
|
displayName?: string;
|
|
333
475
|
}) => Promise<UserCredential>;
|
|
476
|
+
/**
|
|
477
|
+
* Creates a form hook for sign-up authentication.
|
|
478
|
+
*
|
|
479
|
+
* @param onSuccess - Optional callback function called when sign-up is successful.
|
|
480
|
+
* @returns A form instance configured for sign-up.
|
|
481
|
+
*/
|
|
334
482
|
declare function useSignUpAuthForm(onSuccess?: SignUpAuthFormProps["onSignUp"]): _tanstack_react_form.AppFieldExtendedReactFormApi<{
|
|
335
483
|
email: string;
|
|
336
484
|
password: string;
|
|
@@ -355,11 +503,11 @@ declare function useSignUpAuthForm(onSuccess?: SignUpAuthFormProps["onSignUp"]):
|
|
|
355
503
|
email: string;
|
|
356
504
|
password: string;
|
|
357
505
|
displayName: string | undefined;
|
|
358
|
-
}> | undefined,
|
|
359
|
-
email:
|
|
360
|
-
password:
|
|
361
|
-
displayName:
|
|
362
|
-
},
|
|
506
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
507
|
+
email: string;
|
|
508
|
+
password: string;
|
|
509
|
+
displayName: string | undefined;
|
|
510
|
+
}> | undefined, ({ value }: {
|
|
363
511
|
value: {
|
|
364
512
|
email: string;
|
|
365
513
|
password: string;
|
|
@@ -384,183 +532,800 @@ declare function useSignUpAuthForm(onSuccess?: SignUpAuthFormProps["onSignUp"]):
|
|
|
384
532
|
password: string;
|
|
385
533
|
displayName: string | undefined;
|
|
386
534
|
}> | undefined, unknown, {
|
|
387
|
-
readonly Input: ({ children, before, label, action, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
535
|
+
readonly Input: ({ children, before, label, action, description, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
536
|
+
label: string;
|
|
537
|
+
before?: react.ReactNode;
|
|
538
|
+
action?: react.ReactNode;
|
|
539
|
+
description?: react.ReactNode;
|
|
540
|
+
}>) => react_jsx_runtime.JSX.Element;
|
|
541
|
+
}, {
|
|
542
|
+
readonly SubmitButton: (props: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
543
|
+
readonly ErrorMessage: () => react_jsx_runtime.JSX.Element;
|
|
544
|
+
readonly Action: ({ className, ...props }: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
545
|
+
}>;
|
|
546
|
+
/**
|
|
547
|
+
* A form component for signing up with email and password.
|
|
548
|
+
*
|
|
549
|
+
* Optionally includes a display name field if the requireDisplayName behavior is enabled.
|
|
550
|
+
*
|
|
551
|
+
* @returns The sign-up form component.
|
|
552
|
+
*/
|
|
553
|
+
declare function SignUpAuthForm({ onSignInClick, onSignUp }: SignUpAuthFormProps): react_jsx_runtime.JSX.Element;
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Creates a memoized action function for verifying a phone number during SMS multi-factor assertion.
|
|
557
|
+
*
|
|
558
|
+
* @returns A callback function that verifies a phone number using the provided hint and reCAPTCHA verifier.
|
|
559
|
+
*/
|
|
560
|
+
declare function useSmsMultiFactorAssertionPhoneFormAction(): ({ hint, recaptchaVerifier }: {
|
|
561
|
+
hint: MultiFactorInfo;
|
|
562
|
+
recaptchaVerifier: RecaptchaVerifier;
|
|
563
|
+
}) => Promise<string>;
|
|
564
|
+
/**
|
|
565
|
+
* Creates a memoized action function for verifying the SMS verification code during multi-factor assertion.
|
|
566
|
+
*
|
|
567
|
+
* @returns A callback function that verifies the code and signs in with the multi-factor assertion.
|
|
568
|
+
*/
|
|
569
|
+
declare function useSmsMultiFactorAssertionVerifyFormAction(): ({ verificationId, verificationCode }: {
|
|
570
|
+
verificationId: string;
|
|
571
|
+
verificationCode: string;
|
|
572
|
+
}) => Promise<UserCredential>;
|
|
573
|
+
/** Props for the SmsMultiFactorAssertionForm component. */
|
|
574
|
+
type SmsMultiFactorAssertionFormProps = {
|
|
575
|
+
/** The multi-factor info hint containing phone number information. */
|
|
576
|
+
hint: MultiFactorInfo;
|
|
577
|
+
/** Optional callback function called when multi-factor assertion is successful. */
|
|
578
|
+
onSuccess?: (credential: UserCredential) => void;
|
|
579
|
+
};
|
|
580
|
+
/**
|
|
581
|
+
* A form component for SMS multi-factor authentication assertion.
|
|
582
|
+
*
|
|
583
|
+
* Handles the two-step process: first verifying the phone number, then verifying the SMS code.
|
|
584
|
+
*
|
|
585
|
+
* @returns The SMS multi-factor assertion form component.
|
|
586
|
+
*/
|
|
587
|
+
declare function SmsMultiFactorAssertionForm(props: SmsMultiFactorAssertionFormProps): react_jsx_runtime.JSX.Element;
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Creates a memoized action function for verifying a phone number during SMS multi-factor enrollment.
|
|
591
|
+
*
|
|
592
|
+
* @returns A callback function that verifies a phone number for MFA enrollment using the provided reCAPTCHA verifier.
|
|
593
|
+
*/
|
|
594
|
+
declare function useSmsMultiFactorEnrollmentPhoneAuthFormAction(): ({ phoneNumber, recaptchaVerifier }: {
|
|
595
|
+
phoneNumber: string;
|
|
596
|
+
recaptchaVerifier: RecaptchaVerifier;
|
|
597
|
+
}) => Promise<string>;
|
|
598
|
+
/** Options for the SMS multi-factor enrollment phone number form hook. */
|
|
599
|
+
type UseSmsMultiFactorEnrollmentPhoneNumberForm = {
|
|
600
|
+
/** The reCAPTCHA verifier instance. */
|
|
601
|
+
recaptchaVerifier: RecaptchaVerifier;
|
|
602
|
+
/** Callback function called when phone verification is successful. */
|
|
603
|
+
onSuccess: (verificationId: string, displayName?: string) => void;
|
|
604
|
+
/** Optional function to format the phone number before verification. */
|
|
605
|
+
formatPhoneNumber?: (phoneNumber: string) => string;
|
|
606
|
+
};
|
|
607
|
+
/**
|
|
608
|
+
* Creates a form hook for SMS multi-factor enrollment phone number verification.
|
|
609
|
+
*
|
|
610
|
+
* @param options - The phone number form options.
|
|
611
|
+
* @returns A form instance configured for phone number input and verification for MFA enrollment.
|
|
612
|
+
*/
|
|
613
|
+
declare function useSmsMultiFactorEnrollmentPhoneNumberForm({ recaptchaVerifier, onSuccess, formatPhoneNumber, }: UseSmsMultiFactorEnrollmentPhoneNumberForm): _tanstack_react_form.AppFieldExtendedReactFormApi<{
|
|
614
|
+
displayName: string;
|
|
615
|
+
phoneNumber: string;
|
|
616
|
+
}, _tanstack_react_form.FormValidateOrFn<{
|
|
617
|
+
displayName: string;
|
|
618
|
+
phoneNumber: string;
|
|
619
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
620
|
+
displayName: string;
|
|
621
|
+
phoneNumber: string;
|
|
622
|
+
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
623
|
+
displayName: string;
|
|
624
|
+
phoneNumber: string;
|
|
625
|
+
}> | undefined, zod.ZodObject<{
|
|
626
|
+
phoneNumber: zod.ZodString;
|
|
627
|
+
displayName: zod.ZodString;
|
|
628
|
+
}, zod_v4_core.$strip>, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
629
|
+
displayName: string;
|
|
630
|
+
phoneNumber: string;
|
|
631
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
632
|
+
displayName: string;
|
|
633
|
+
phoneNumber: string;
|
|
634
|
+
}> | undefined, ({ value }: {
|
|
635
|
+
value: {
|
|
636
|
+
displayName: string;
|
|
637
|
+
phoneNumber: string;
|
|
638
|
+
};
|
|
639
|
+
formApi: _tanstack_react_form.FormApi<{
|
|
640
|
+
displayName: string;
|
|
641
|
+
phoneNumber: string;
|
|
642
|
+
}, any, any, any, any, any, any, any, any, any, any, any>;
|
|
643
|
+
signal: AbortSignal;
|
|
644
|
+
}) => Promise<string | void>, _tanstack_react_form.FormValidateOrFn<{
|
|
645
|
+
displayName: string;
|
|
646
|
+
phoneNumber: string;
|
|
647
|
+
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
648
|
+
displayName: string;
|
|
649
|
+
phoneNumber: string;
|
|
650
|
+
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
651
|
+
displayName: string;
|
|
652
|
+
phoneNumber: string;
|
|
653
|
+
}> | undefined, unknown, {
|
|
654
|
+
readonly Input: ({ children, before, label, action, description, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
655
|
+
label: string;
|
|
656
|
+
before?: react.ReactNode;
|
|
657
|
+
action?: react.ReactNode;
|
|
658
|
+
description?: react.ReactNode;
|
|
659
|
+
}>) => react_jsx_runtime.JSX.Element;
|
|
660
|
+
}, {
|
|
661
|
+
readonly SubmitButton: (props: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
662
|
+
readonly ErrorMessage: () => react_jsx_runtime.JSX.Element;
|
|
663
|
+
readonly Action: ({ className, ...props }: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
664
|
+
}>;
|
|
665
|
+
/**
|
|
666
|
+
* Creates a memoized action function for verifying the SMS verification code during multi-factor enrollment.
|
|
667
|
+
*
|
|
668
|
+
* @returns A callback function that verifies the code and enrolls the phone number as a multi-factor authentication method.
|
|
669
|
+
*/
|
|
670
|
+
declare function useMultiFactorEnrollmentVerifyPhoneNumberFormAction(): ({ verificationId, verificationCode, displayName, }: {
|
|
671
|
+
verificationId: string;
|
|
672
|
+
verificationCode: string;
|
|
673
|
+
displayName?: string;
|
|
674
|
+
}) => Promise<void>;
|
|
675
|
+
/** Options for the multi-factor enrollment verify phone number form hook. */
|
|
676
|
+
type UseMultiFactorEnrollmentVerifyPhoneNumberForm = {
|
|
677
|
+
/** The verification ID from the phone verification step. */
|
|
678
|
+
verificationId: string;
|
|
679
|
+
/** Optional display name for the enrolled MFA method. */
|
|
680
|
+
displayName?: string;
|
|
681
|
+
/** Callback function called when enrollment is successful. */
|
|
682
|
+
onSuccess: () => void;
|
|
683
|
+
};
|
|
684
|
+
/**
|
|
685
|
+
* Creates a form hook for SMS multi-factor enrollment verification code input.
|
|
686
|
+
*
|
|
687
|
+
* @param options - The verify phone number form options.
|
|
688
|
+
* @returns A form instance configured for verification code input during MFA enrollment.
|
|
689
|
+
*/
|
|
690
|
+
declare function useMultiFactorEnrollmentVerifyPhoneNumberForm({ verificationId, displayName, onSuccess, }: UseMultiFactorEnrollmentVerifyPhoneNumberForm): _tanstack_react_form.AppFieldExtendedReactFormApi<{
|
|
691
|
+
verificationId: string;
|
|
692
|
+
verificationCode: string;
|
|
693
|
+
}, _tanstack_react_form.FormValidateOrFn<{
|
|
694
|
+
verificationId: string;
|
|
695
|
+
verificationCode: string;
|
|
696
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
697
|
+
verificationId: string;
|
|
698
|
+
verificationCode: string;
|
|
699
|
+
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
700
|
+
verificationId: string;
|
|
701
|
+
verificationCode: string;
|
|
702
|
+
}> | undefined, zod.ZodObject<{
|
|
703
|
+
verificationId: zod.ZodString;
|
|
704
|
+
verificationCode: zod.ZodString;
|
|
705
|
+
}, zod_v4_core.$strip>, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
706
|
+
verificationId: string;
|
|
707
|
+
verificationCode: string;
|
|
708
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
709
|
+
verificationId: string;
|
|
710
|
+
verificationCode: string;
|
|
711
|
+
}> | undefined, ({ value }: {
|
|
712
|
+
value: {
|
|
713
|
+
verificationId: string;
|
|
714
|
+
verificationCode: string;
|
|
715
|
+
};
|
|
716
|
+
formApi: _tanstack_react_form.FormApi<{
|
|
717
|
+
verificationId: string;
|
|
718
|
+
verificationCode: string;
|
|
719
|
+
}, any, any, any, any, any, any, any, any, any, any, any>;
|
|
720
|
+
signal: AbortSignal;
|
|
721
|
+
}) => Promise<string | void>, _tanstack_react_form.FormValidateOrFn<{
|
|
722
|
+
verificationId: string;
|
|
723
|
+
verificationCode: string;
|
|
724
|
+
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
725
|
+
verificationId: string;
|
|
726
|
+
verificationCode: string;
|
|
727
|
+
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
728
|
+
verificationId: string;
|
|
729
|
+
verificationCode: string;
|
|
730
|
+
}> | undefined, unknown, {
|
|
731
|
+
readonly Input: ({ children, before, label, action, description, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
732
|
+
label: string;
|
|
733
|
+
before?: react.ReactNode;
|
|
734
|
+
action?: react.ReactNode;
|
|
735
|
+
description?: react.ReactNode;
|
|
736
|
+
}>) => react_jsx_runtime.JSX.Element;
|
|
737
|
+
}, {
|
|
738
|
+
readonly SubmitButton: (props: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
739
|
+
readonly ErrorMessage: () => react_jsx_runtime.JSX.Element;
|
|
740
|
+
readonly Action: ({ className, ...props }: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
741
|
+
}>;
|
|
742
|
+
/** Props for the MultiFactorEnrollmentVerifyPhoneNumberForm component. */
|
|
743
|
+
type MultiFactorEnrollmentVerifyPhoneNumberFormProps = {
|
|
744
|
+
/** The verification ID from the phone verification step. */
|
|
745
|
+
verificationId: string;
|
|
746
|
+
/** Optional display name for the enrolled MFA method. */
|
|
747
|
+
displayName?: string;
|
|
748
|
+
/** Callback function called when enrollment is successful. */
|
|
749
|
+
onSuccess: () => void;
|
|
750
|
+
};
|
|
751
|
+
/**
|
|
752
|
+
* A form component for verifying the SMS code during multi-factor enrollment.
|
|
753
|
+
*
|
|
754
|
+
* @returns The verify phone number form component.
|
|
755
|
+
*/
|
|
756
|
+
declare function MultiFactorEnrollmentVerifyPhoneNumberForm(props: MultiFactorEnrollmentVerifyPhoneNumberFormProps): react_jsx_runtime.JSX.Element;
|
|
757
|
+
/** Props for the SmsMultiFactorEnrollmentForm component. */
|
|
758
|
+
type SmsMultiFactorEnrollmentFormProps = {
|
|
759
|
+
/** Optional callback function called when enrollment is successful. */
|
|
760
|
+
onSuccess?: () => void;
|
|
761
|
+
};
|
|
762
|
+
/**
|
|
763
|
+
* A form component for SMS multi-factor authentication enrollment.
|
|
764
|
+
*
|
|
765
|
+
* Handles the two-step process: first entering the phone number and display name, then verifying the SMS code.
|
|
766
|
+
*
|
|
767
|
+
* @returns The SMS multi-factor enrollment form component.
|
|
768
|
+
* @throws {Error} Throws an error if the user is not authenticated.
|
|
769
|
+
*/
|
|
770
|
+
declare function SmsMultiFactorEnrollmentForm(props: SmsMultiFactorEnrollmentFormProps): react_jsx_runtime.JSX.Element;
|
|
771
|
+
|
|
772
|
+
/**
|
|
773
|
+
* Creates a memoized action function for verifying a TOTP code during multi-factor assertion.
|
|
774
|
+
*
|
|
775
|
+
* @returns A callback function that verifies the TOTP code and signs in with the multi-factor assertion.
|
|
776
|
+
*/
|
|
777
|
+
declare function useTotpMultiFactorAssertionFormAction(): ({ verificationCode, hint }: {
|
|
778
|
+
verificationCode: string;
|
|
779
|
+
hint: MultiFactorInfo;
|
|
780
|
+
}) => Promise<UserCredential>;
|
|
781
|
+
/** Options for the TOTP multi-factor assertion form hook. */
|
|
782
|
+
type UseTotpMultiFactorAssertionForm = {
|
|
783
|
+
/** The multi-factor info hint containing TOTP information. */
|
|
784
|
+
hint: MultiFactorInfo;
|
|
785
|
+
/** Callback function called when verification is successful. */
|
|
786
|
+
onSuccess: (credential: UserCredential) => void;
|
|
787
|
+
};
|
|
788
|
+
/**
|
|
789
|
+
* Creates a form hook for TOTP multi-factor assertion verification code input.
|
|
790
|
+
*
|
|
791
|
+
* @param options - The TOTP assertion form options.
|
|
792
|
+
* @returns A form instance configured for TOTP verification code input.
|
|
793
|
+
*/
|
|
794
|
+
declare function useTotpMultiFactorAssertionForm({ hint, onSuccess }: UseTotpMultiFactorAssertionForm): _tanstack_react_form.AppFieldExtendedReactFormApi<{
|
|
795
|
+
verificationCode: string;
|
|
796
|
+
}, _tanstack_react_form.FormValidateOrFn<{
|
|
797
|
+
verificationCode: string;
|
|
798
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
799
|
+
verificationCode: string;
|
|
800
|
+
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
801
|
+
verificationCode: string;
|
|
802
|
+
}> | undefined, zod.ZodObject<{
|
|
803
|
+
verificationCode: zod.ZodString;
|
|
804
|
+
}, zod_v4_core.$strip>, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
805
|
+
verificationCode: string;
|
|
806
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
807
|
+
verificationCode: string;
|
|
808
|
+
}> | undefined, ({ value }: {
|
|
809
|
+
value: {
|
|
810
|
+
verificationCode: string;
|
|
811
|
+
};
|
|
812
|
+
formApi: _tanstack_react_form.FormApi<{
|
|
813
|
+
verificationCode: string;
|
|
814
|
+
}, any, any, any, any, any, any, any, any, any, any, any>;
|
|
815
|
+
signal: AbortSignal;
|
|
816
|
+
}) => Promise<string | void>, _tanstack_react_form.FormValidateOrFn<{
|
|
817
|
+
verificationCode: string;
|
|
818
|
+
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
819
|
+
verificationCode: string;
|
|
820
|
+
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
821
|
+
verificationCode: string;
|
|
822
|
+
}> | undefined, unknown, {
|
|
823
|
+
readonly Input: ({ children, before, label, action, description, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
824
|
+
label: string;
|
|
825
|
+
before?: react.ReactNode;
|
|
826
|
+
action?: react.ReactNode;
|
|
827
|
+
description?: react.ReactNode;
|
|
828
|
+
}>) => react_jsx_runtime.JSX.Element;
|
|
829
|
+
}, {
|
|
830
|
+
readonly SubmitButton: (props: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
831
|
+
readonly ErrorMessage: () => react_jsx_runtime.JSX.Element;
|
|
832
|
+
readonly Action: ({ className, ...props }: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
833
|
+
}>;
|
|
834
|
+
/** Props for the TotpMultiFactorAssertionForm component. */
|
|
835
|
+
type TotpMultiFactorAssertionFormProps = {
|
|
836
|
+
/** The multi-factor info hint containing TOTP information. */
|
|
837
|
+
hint: MultiFactorInfo;
|
|
838
|
+
/** Optional callback function called when multi-factor assertion is successful. */
|
|
839
|
+
onSuccess?: (credential: UserCredential) => void;
|
|
840
|
+
};
|
|
841
|
+
/**
|
|
842
|
+
* A form component for TOTP multi-factor authentication assertion.
|
|
843
|
+
*
|
|
844
|
+
* Allows users to enter a 6-digit TOTP code from their authenticator app.
|
|
845
|
+
*
|
|
846
|
+
* @returns The TOTP multi-factor assertion form component.
|
|
847
|
+
*/
|
|
848
|
+
declare function TotpMultiFactorAssertionForm(props: TotpMultiFactorAssertionFormProps): react_jsx_runtime.JSX.Element;
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* Creates a memoized action function for generating a TOTP secret for multi-factor enrollment.
|
|
852
|
+
*
|
|
853
|
+
* @returns A callback function that generates a TOTP secret.
|
|
854
|
+
*/
|
|
855
|
+
declare function useTotpMultiFactorSecretGenerationFormAction(): () => Promise<TotpSecret>;
|
|
856
|
+
/** Options for the TOTP multi-factor enrollment form hook. */
|
|
857
|
+
type UseTotpMultiFactorEnrollmentForm = {
|
|
858
|
+
/** Callback function called when the TOTP secret is generated. */
|
|
859
|
+
onSuccess: (secret: TotpSecret, displayName: string) => void;
|
|
860
|
+
};
|
|
861
|
+
/**
|
|
862
|
+
* Creates a form hook for TOTP multi-factor enrollment secret generation.
|
|
863
|
+
*
|
|
864
|
+
* @param options - The TOTP enrollment form options.
|
|
865
|
+
* @returns A form instance configured for display name input and secret generation.
|
|
866
|
+
*/
|
|
867
|
+
declare function useTotpMultiFactorSecretGenerationForm({ onSuccess }: UseTotpMultiFactorEnrollmentForm): _tanstack_react_form.AppFieldExtendedReactFormApi<{
|
|
868
|
+
displayName: string;
|
|
869
|
+
}, _tanstack_react_form.FormValidateOrFn<{
|
|
870
|
+
displayName: string;
|
|
871
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
872
|
+
displayName: string;
|
|
873
|
+
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
874
|
+
displayName: string;
|
|
875
|
+
}> | undefined, zod.ZodObject<{
|
|
876
|
+
displayName: zod.ZodString;
|
|
877
|
+
}, zod_v4_core.$strip>, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
878
|
+
displayName: string;
|
|
879
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
880
|
+
displayName: string;
|
|
881
|
+
}> | undefined, ({ value }: {
|
|
882
|
+
value: {
|
|
883
|
+
displayName: string;
|
|
884
|
+
};
|
|
885
|
+
formApi: _tanstack_react_form.FormApi<{
|
|
886
|
+
displayName: string;
|
|
887
|
+
}, any, any, any, any, any, any, any, any, any, any, any>;
|
|
888
|
+
signal: AbortSignal;
|
|
889
|
+
}) => Promise<string | void>, _tanstack_react_form.FormValidateOrFn<{
|
|
890
|
+
displayName: string;
|
|
891
|
+
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
892
|
+
displayName: string;
|
|
893
|
+
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
894
|
+
displayName: string;
|
|
895
|
+
}> | undefined, unknown, {
|
|
896
|
+
readonly Input: ({ children, before, label, action, description, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
897
|
+
label: string;
|
|
898
|
+
before?: react.ReactNode;
|
|
899
|
+
action?: react.ReactNode;
|
|
900
|
+
description?: react.ReactNode;
|
|
901
|
+
}>) => react_jsx_runtime.JSX.Element;
|
|
902
|
+
}, {
|
|
903
|
+
readonly SubmitButton: (props: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
904
|
+
readonly ErrorMessage: () => react_jsx_runtime.JSX.Element;
|
|
905
|
+
readonly Action: ({ className, ...props }: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
906
|
+
}>;
|
|
907
|
+
/**
|
|
908
|
+
* Creates a memoized action function for verifying the TOTP code during multi-factor enrollment.
|
|
909
|
+
*
|
|
910
|
+
* @returns A callback function that verifies the TOTP code and enrolls it as a multi-factor authentication method.
|
|
911
|
+
*/
|
|
912
|
+
declare function useMultiFactorEnrollmentVerifyTotpFormAction(): ({ secret, verificationCode, displayName, }: {
|
|
913
|
+
secret: TotpSecret;
|
|
914
|
+
verificationCode: string;
|
|
915
|
+
displayName: string;
|
|
916
|
+
}) => Promise<void>;
|
|
917
|
+
/** Options for the multi-factor enrollment verify TOTP form hook. */
|
|
918
|
+
type UseMultiFactorEnrollmentVerifyTotpForm = {
|
|
919
|
+
/** The TOTP secret generated in the previous step. */
|
|
920
|
+
secret: TotpSecret;
|
|
921
|
+
/** The display name for the enrolled MFA method. */
|
|
922
|
+
displayName: string;
|
|
923
|
+
/** Callback function called when enrollment is successful. */
|
|
924
|
+
onSuccess: () => void;
|
|
925
|
+
};
|
|
926
|
+
/**
|
|
927
|
+
* Creates a form hook for TOTP multi-factor enrollment verification code input.
|
|
928
|
+
*
|
|
929
|
+
* @param options - The verify TOTP form options.
|
|
930
|
+
* @returns A form instance configured for TOTP verification code input during MFA enrollment.
|
|
931
|
+
*/
|
|
932
|
+
declare function useMultiFactorEnrollmentVerifyTotpForm({ secret, displayName, onSuccess, }: UseMultiFactorEnrollmentVerifyTotpForm): _tanstack_react_form.AppFieldExtendedReactFormApi<{
|
|
933
|
+
verificationCode: string;
|
|
934
|
+
}, _tanstack_react_form.FormValidateOrFn<{
|
|
935
|
+
verificationCode: string;
|
|
936
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
937
|
+
verificationCode: string;
|
|
938
|
+
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
939
|
+
verificationCode: string;
|
|
940
|
+
}> | undefined, zod.ZodObject<{
|
|
941
|
+
verificationCode: zod.ZodString;
|
|
942
|
+
}, zod_v4_core.$strip>, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
943
|
+
verificationCode: string;
|
|
944
|
+
}> | undefined, _tanstack_react_form.FormValidateOrFn<{
|
|
945
|
+
verificationCode: string;
|
|
946
|
+
}> | undefined, ({ value }: {
|
|
947
|
+
value: {
|
|
948
|
+
verificationCode: string;
|
|
949
|
+
};
|
|
950
|
+
formApi: _tanstack_react_form.FormApi<{
|
|
951
|
+
verificationCode: string;
|
|
952
|
+
}, any, any, any, any, any, any, any, any, any, any, any>;
|
|
953
|
+
signal: AbortSignal;
|
|
954
|
+
}) => Promise<string | void>, _tanstack_react_form.FormValidateOrFn<{
|
|
955
|
+
verificationCode: string;
|
|
956
|
+
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
957
|
+
verificationCode: string;
|
|
958
|
+
}> | undefined, _tanstack_react_form.FormAsyncValidateOrFn<{
|
|
959
|
+
verificationCode: string;
|
|
960
|
+
}> | undefined, unknown, {
|
|
961
|
+
readonly Input: ({ children, before, label, action, description, ...props }: react.PropsWithChildren<react.ComponentProps<"input"> & {
|
|
388
962
|
label: string;
|
|
389
963
|
before?: react.ReactNode;
|
|
390
964
|
action?: react.ReactNode;
|
|
965
|
+
description?: react.ReactNode;
|
|
391
966
|
}>) => react_jsx_runtime.JSX.Element;
|
|
392
967
|
}, {
|
|
393
968
|
readonly SubmitButton: (props: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
394
969
|
readonly ErrorMessage: () => react_jsx_runtime.JSX.Element;
|
|
395
970
|
readonly Action: ({ className, ...props }: react.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
396
971
|
}>;
|
|
397
|
-
|
|
972
|
+
/** Props for the MultiFactorEnrollmentVerifyTotpForm component. */
|
|
973
|
+
type MultiFactorEnrollmentVerifyTotpFormProps = {
|
|
974
|
+
/** The TOTP secret generated in the previous step. */
|
|
975
|
+
secret: TotpSecret;
|
|
976
|
+
/** The display name for the enrolled MFA method. */
|
|
977
|
+
displayName: string;
|
|
978
|
+
/** Callback function called when enrollment is successful. */
|
|
979
|
+
onSuccess: () => void;
|
|
980
|
+
};
|
|
981
|
+
/**
|
|
982
|
+
* A form component for verifying the TOTP code during multi-factor enrollment.
|
|
983
|
+
*
|
|
984
|
+
* Displays a QR code and secret key for the user to scan with their authenticator app,
|
|
985
|
+
* then allows them to verify the enrollment with a TOTP code.
|
|
986
|
+
*
|
|
987
|
+
* @returns The verify TOTP form component.
|
|
988
|
+
*/
|
|
989
|
+
declare function MultiFactorEnrollmentVerifyTotpForm(props: MultiFactorEnrollmentVerifyTotpFormProps): react_jsx_runtime.JSX.Element;
|
|
990
|
+
/** Props for the TotpMultiFactorEnrollmentForm component. */
|
|
991
|
+
type TotpMultiFactorEnrollmentFormProps = {
|
|
992
|
+
/** Optional callback function called when enrollment is successful. */
|
|
993
|
+
onSuccess?: () => void;
|
|
994
|
+
};
|
|
995
|
+
/**
|
|
996
|
+
* A form component for TOTP multi-factor authentication enrollment.
|
|
997
|
+
*
|
|
998
|
+
* Handles the two-step process: first generating a TOTP secret and QR code, then verifying the TOTP code.
|
|
999
|
+
*
|
|
1000
|
+
* @returns The TOTP multi-factor enrollment form component.
|
|
1001
|
+
* @throws {Error} Throws an error if the user is not authenticated.
|
|
1002
|
+
*/
|
|
1003
|
+
declare function TotpMultiFactorEnrollmentForm(props: TotpMultiFactorEnrollmentFormProps): react_jsx_runtime.JSX.Element;
|
|
398
1004
|
|
|
399
|
-
|
|
400
|
-
|
|
1005
|
+
/** Props for the EmailLinkAuthScreen component. */
|
|
1006
|
+
type EmailLinkAuthScreenProps = PropsWithChildren<Pick<EmailLinkAuthFormProps, "onEmailSent"> & {
|
|
1007
|
+
/** Callback function called when sign-in is successful. */
|
|
1008
|
+
onSignIn?: (user: User) => void;
|
|
1009
|
+
}>;
|
|
1010
|
+
/**
|
|
1011
|
+
* A screen component for email link authentication.
|
|
1012
|
+
*
|
|
1013
|
+
* Displays a card with the email link auth form and handles multi-factor authentication if required.
|
|
1014
|
+
*
|
|
1015
|
+
* @returns The email link auth screen component.
|
|
1016
|
+
*/
|
|
1017
|
+
declare function EmailLinkAuthScreen({ children, onEmailSent, onSignIn }: EmailLinkAuthScreenProps): react_jsx_runtime.JSX.Element;
|
|
401
1018
|
|
|
1019
|
+
/** Props for the ForgotPasswordAuthScreen component. */
|
|
402
1020
|
type ForgotPasswordAuthScreenProps = ForgotPasswordAuthFormProps;
|
|
1021
|
+
/**
|
|
1022
|
+
* A screen component for requesting a password reset.
|
|
1023
|
+
*
|
|
1024
|
+
* Displays a card with the forgot password form.
|
|
1025
|
+
*
|
|
1026
|
+
* @returns The forgot password screen component.
|
|
1027
|
+
*/
|
|
403
1028
|
declare function ForgotPasswordAuthScreen(props: ForgotPasswordAuthScreenProps): react_jsx_runtime.JSX.Element;
|
|
404
1029
|
|
|
405
|
-
|
|
406
|
-
|
|
1030
|
+
/** Props for the MultiFactorAuthAssertionScreen component. */
|
|
1031
|
+
type MultiFactorAuthAssertionScreenProps = MultiFactorAuthAssertionFormProps;
|
|
1032
|
+
/**
|
|
1033
|
+
* A screen component for multi-factor authentication assertion.
|
|
1034
|
+
*
|
|
1035
|
+
* Displays a card with the multi-factor assertion form.
|
|
1036
|
+
*
|
|
1037
|
+
* @returns The multi-factor auth assertion screen component.
|
|
1038
|
+
*/
|
|
1039
|
+
declare function MultiFactorAuthAssertionScreen(props: MultiFactorAuthAssertionScreenProps): react_jsx_runtime.JSX.Element;
|
|
1040
|
+
|
|
1041
|
+
/** Props for the MultiFactorAuthEnrollmentScreen component. */
|
|
1042
|
+
type MultiFactorAuthEnrollmentScreenProps = MultiFactorAuthEnrollmentFormProps;
|
|
1043
|
+
/**
|
|
1044
|
+
* A screen component for multi-factor authentication enrollment.
|
|
1045
|
+
*
|
|
1046
|
+
* Displays a card with the multi-factor enrollment form.
|
|
1047
|
+
*
|
|
1048
|
+
* @returns The multi-factor auth enrollment screen component.
|
|
1049
|
+
*/
|
|
1050
|
+
declare function MultiFactorAuthEnrollmentScreen(props: MultiFactorAuthEnrollmentScreenProps): react_jsx_runtime.JSX.Element;
|
|
1051
|
+
|
|
1052
|
+
/** Props for the OAuthScreen component. */
|
|
1053
|
+
type OAuthScreenProps = PropsWithChildren<{
|
|
1054
|
+
/** Callback function called when sign-in is successful. */
|
|
1055
|
+
onSignIn?: (user: User) => void;
|
|
1056
|
+
}>;
|
|
1057
|
+
/**
|
|
1058
|
+
* A screen component for OAuth provider authentication.
|
|
1059
|
+
*
|
|
1060
|
+
* Displays a card that should contain OAuth sign-in buttons as children.
|
|
1061
|
+
* Handles multi-factor authentication if required.
|
|
1062
|
+
*
|
|
1063
|
+
* @returns The OAuth screen component.
|
|
1064
|
+
*/
|
|
1065
|
+
declare function OAuthScreen({ children, onSignIn }: OAuthScreenProps): react_jsx_runtime.JSX.Element;
|
|
407
1066
|
|
|
408
|
-
|
|
1067
|
+
/** Props for the PhoneAuthScreen component. */
|
|
1068
|
+
type PhoneAuthScreenProps = PropsWithChildren<{
|
|
1069
|
+
/** Callback function called when sign-in is successful. */
|
|
1070
|
+
onSignIn?: (user: User) => void;
|
|
1071
|
+
}>;
|
|
1072
|
+
/**
|
|
1073
|
+
* A screen component for phone authentication.
|
|
1074
|
+
*
|
|
1075
|
+
* Displays a card with the phone auth form and handles multi-factor authentication if required.
|
|
1076
|
+
*
|
|
1077
|
+
* @returns The phone auth screen component.
|
|
1078
|
+
*/
|
|
409
1079
|
declare function PhoneAuthScreen({ children, ...props }: PhoneAuthScreenProps): react_jsx_runtime.JSX.Element;
|
|
410
1080
|
|
|
411
|
-
|
|
412
|
-
|
|
1081
|
+
/** Props for the SignInAuthScreen component. */
|
|
1082
|
+
type SignInAuthScreenProps = PropsWithChildren<Omit<SignInAuthFormProps, "onSignIn">> & {
|
|
1083
|
+
/** Callback function called when sign-in is successful. */
|
|
1084
|
+
onSignIn?: (user: User) => void;
|
|
1085
|
+
};
|
|
1086
|
+
/**
|
|
1087
|
+
* A screen component for signing in with email and password.
|
|
1088
|
+
*
|
|
1089
|
+
* Displays a card with the sign-in form and handles multi-factor authentication if required.
|
|
1090
|
+
*
|
|
1091
|
+
* @returns The sign-in screen component.
|
|
1092
|
+
*/
|
|
1093
|
+
declare function SignInAuthScreen({ children, onSignIn, ...props }: SignInAuthScreenProps): react_jsx_runtime.JSX.Element;
|
|
413
1094
|
|
|
414
|
-
|
|
415
|
-
|
|
1095
|
+
/** Props for the SignUpAuthScreen component. */
|
|
1096
|
+
type SignUpAuthScreenProps = PropsWithChildren<Omit<SignUpAuthFormProps, "onSignUp">> & {
|
|
1097
|
+
/** Callback function called when sign-up is successful. */
|
|
1098
|
+
onSignUp?: (user: User) => void;
|
|
1099
|
+
};
|
|
1100
|
+
/**
|
|
1101
|
+
* A screen component for signing up with email and password.
|
|
1102
|
+
*
|
|
1103
|
+
* Displays a card with the sign-up form and handles multi-factor authentication if required.
|
|
1104
|
+
*
|
|
1105
|
+
* @returns The sign-up screen component.
|
|
1106
|
+
*/
|
|
1107
|
+
declare function SignUpAuthScreen({ children, onSignUp, ...props }: SignUpAuthScreenProps): react_jsx_runtime.JSX.Element;
|
|
416
1108
|
|
|
1109
|
+
/** Props for the AppleSignInButton component. */
|
|
417
1110
|
type AppleSignInButtonProps = {
|
|
1111
|
+
/** Optional OAuth provider instance. Defaults to Apple provider. */
|
|
418
1112
|
provider?: OAuthProvider;
|
|
1113
|
+
/** Whether to apply themed styling. */
|
|
419
1114
|
themed?: boolean;
|
|
1115
|
+
/** Callback function called when sign-in is successful. */
|
|
1116
|
+
onSignIn?: (credential: UserCredential) => void;
|
|
420
1117
|
};
|
|
421
|
-
|
|
1118
|
+
/**
|
|
1119
|
+
* A button component for signing in with Apple.
|
|
1120
|
+
*
|
|
1121
|
+
* @returns The Apple sign-in button component.
|
|
1122
|
+
*/
|
|
1123
|
+
declare function AppleSignInButton({ provider, ...props }: AppleSignInButtonProps): react_jsx_runtime.JSX.Element;
|
|
1124
|
+
/**
|
|
1125
|
+
* The Apple logo SVG component.
|
|
1126
|
+
*
|
|
1127
|
+
* @returns The Apple logo component.
|
|
1128
|
+
*/
|
|
422
1129
|
declare function AppleLogo({ className, ...props }: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
423
1130
|
|
|
1131
|
+
/** Props for the FacebookSignInButton component. */
|
|
424
1132
|
type FacebookSignInButtonProps = {
|
|
1133
|
+
/** Optional OAuth provider instance. Defaults to Facebook provider. */
|
|
425
1134
|
provider?: FacebookAuthProvider;
|
|
1135
|
+
/** Whether to apply themed styling. */
|
|
426
1136
|
themed?: boolean;
|
|
1137
|
+
/** Callback function called when sign-in is successful. */
|
|
1138
|
+
onSignIn?: (credential: UserCredential) => void;
|
|
427
1139
|
};
|
|
428
|
-
|
|
1140
|
+
/**
|
|
1141
|
+
* A button component for signing in with Facebook.
|
|
1142
|
+
*
|
|
1143
|
+
* @returns The Facebook sign-in button component.
|
|
1144
|
+
*/
|
|
1145
|
+
declare function FacebookSignInButton({ provider, ...props }: FacebookSignInButtonProps): react_jsx_runtime.JSX.Element;
|
|
1146
|
+
/**
|
|
1147
|
+
* The Facebook logo SVG component.
|
|
1148
|
+
*
|
|
1149
|
+
* @returns The Facebook logo component.
|
|
1150
|
+
*/
|
|
429
1151
|
declare function FacebookLogo({ className, ...props }: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
430
1152
|
|
|
1153
|
+
/** Props for the GitHubSignInButton component. */
|
|
431
1154
|
type GitHubSignInButtonProps = {
|
|
1155
|
+
/** Optional OAuth provider instance. Defaults to GitHub provider. */
|
|
432
1156
|
provider?: GithubAuthProvider;
|
|
1157
|
+
/** Whether to apply themed styling. */
|
|
433
1158
|
themed?: boolean;
|
|
1159
|
+
/** Callback function called when sign-in is successful. */
|
|
1160
|
+
onSignIn?: (credential: UserCredential) => void;
|
|
434
1161
|
};
|
|
435
|
-
|
|
1162
|
+
/**
|
|
1163
|
+
* A button component for signing in with GitHub.
|
|
1164
|
+
*
|
|
1165
|
+
* @returns The GitHub sign-in button component.
|
|
1166
|
+
*/
|
|
1167
|
+
declare function GitHubSignInButton({ provider, ...props }: GitHubSignInButtonProps): react_jsx_runtime.JSX.Element;
|
|
1168
|
+
/**
|
|
1169
|
+
* The GitHub logo SVG component.
|
|
1170
|
+
*
|
|
1171
|
+
* @returns The GitHub logo component.
|
|
1172
|
+
*/
|
|
436
1173
|
declare function GitHubLogo({ className, ...props }: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
437
1174
|
|
|
1175
|
+
/** Props for the GoogleSignInButton component. */
|
|
438
1176
|
type GoogleSignInButtonProps = {
|
|
1177
|
+
/** Optional OAuth provider instance. Defaults to Google provider. */
|
|
439
1178
|
provider?: GoogleAuthProvider;
|
|
1179
|
+
/** Whether to apply themed styling. Can be true, false, or "neutral". */
|
|
440
1180
|
themed?: boolean | "neutral";
|
|
1181
|
+
/** Callback function called when sign-in is successful. */
|
|
1182
|
+
onSignIn?: (credential: UserCredential) => void;
|
|
441
1183
|
};
|
|
442
|
-
|
|
1184
|
+
/**
|
|
1185
|
+
* A button component for signing in with Google.
|
|
1186
|
+
*
|
|
1187
|
+
* @returns The Google sign-in button component.
|
|
1188
|
+
*/
|
|
1189
|
+
declare function GoogleSignInButton({ provider, ...props }: GoogleSignInButtonProps): react_jsx_runtime.JSX.Element;
|
|
1190
|
+
/**
|
|
1191
|
+
* The Google logo SVG component.
|
|
1192
|
+
*
|
|
1193
|
+
* @returns The Google logo component.
|
|
1194
|
+
*/
|
|
443
1195
|
declare function GoogleLogo({ className, ...props }: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
444
1196
|
|
|
1197
|
+
/** Props for the MicrosoftSignInButton component. */
|
|
445
1198
|
type MicrosoftSignInButtonProps = {
|
|
1199
|
+
/** Optional OAuth provider instance. Defaults to Microsoft provider. */
|
|
446
1200
|
provider?: OAuthProvider;
|
|
1201
|
+
/** Whether to apply themed styling. */
|
|
447
1202
|
themed?: boolean;
|
|
1203
|
+
/** Callback function called when sign-in is successful. */
|
|
1204
|
+
onSignIn?: (credential: UserCredential) => void;
|
|
448
1205
|
};
|
|
449
|
-
|
|
1206
|
+
/**
|
|
1207
|
+
* A button component for signing in with Microsoft.
|
|
1208
|
+
*
|
|
1209
|
+
* @returns The Microsoft sign-in button component.
|
|
1210
|
+
*/
|
|
1211
|
+
declare function MicrosoftSignInButton({ provider, ...props }: MicrosoftSignInButtonProps): react_jsx_runtime.JSX.Element;
|
|
1212
|
+
/**
|
|
1213
|
+
* The Microsoft logo SVG component.
|
|
1214
|
+
*
|
|
1215
|
+
* @returns The Microsoft logo component.
|
|
1216
|
+
*/
|
|
450
1217
|
declare function MicrosoftLogo({ className, ...props }: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
451
1218
|
|
|
1219
|
+
/** Props for the TwitterSignInButton component. */
|
|
452
1220
|
type TwitterSignInButtonProps = {
|
|
1221
|
+
/** Optional OAuth provider instance. Defaults to Twitter provider. */
|
|
453
1222
|
provider?: TwitterAuthProvider;
|
|
1223
|
+
/** Whether to apply themed styling. */
|
|
454
1224
|
themed?: boolean;
|
|
1225
|
+
/** Callback function called when sign-in is successful. */
|
|
1226
|
+
onSignIn?: (credential: UserCredential) => void;
|
|
455
1227
|
};
|
|
456
|
-
|
|
1228
|
+
/**
|
|
1229
|
+
* A button component for signing in with Twitter.
|
|
1230
|
+
*
|
|
1231
|
+
* @returns The Twitter sign-in button component.
|
|
1232
|
+
*/
|
|
1233
|
+
declare function TwitterSignInButton({ provider, ...props }: TwitterSignInButtonProps): react_jsx_runtime.JSX.Element;
|
|
1234
|
+
/**
|
|
1235
|
+
* The Twitter logo SVG component.
|
|
1236
|
+
*
|
|
1237
|
+
* @returns The Twitter logo component.
|
|
1238
|
+
*/
|
|
457
1239
|
declare function TwitterLogo({ className, ...props }: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
458
1240
|
|
|
1241
|
+
/** Props for the OAuthButton component. */
|
|
459
1242
|
type OAuthButtonProps = PropsWithChildren<{
|
|
1243
|
+
/** The authentication provider to sign in with. */
|
|
460
1244
|
provider: AuthProvider;
|
|
1245
|
+
/** Whether to use themed styling for the button. */
|
|
461
1246
|
themed?: boolean | string;
|
|
1247
|
+
/** Callback function called when sign-in is successful. */
|
|
1248
|
+
onSignIn?: (credential: UserCredential) => void;
|
|
462
1249
|
}>;
|
|
463
|
-
|
|
1250
|
+
/**
|
|
1251
|
+
* Hook for signing in with an OAuth provider.
|
|
1252
|
+
*
|
|
1253
|
+
* @param provider - The authentication provider to sign in with.
|
|
1254
|
+
* @param onSignIn - Optional callback function called when sign-in is successful.
|
|
1255
|
+
* @returns An object containing the error state and a callback function to trigger sign-in.
|
|
1256
|
+
*/
|
|
1257
|
+
declare function useSignInWithProvider(provider: AuthProvider, onSignIn?: (credential: UserCredential) => void): {
|
|
464
1258
|
error: string | null;
|
|
465
1259
|
callback: () => Promise<void>;
|
|
466
1260
|
};
|
|
467
|
-
declare function OAuthButton({ provider, children, themed }: OAuthButtonProps): react_jsx_runtime.JSX.Element;
|
|
468
|
-
|
|
469
|
-
type Hint = (typeof FactorId)[keyof typeof FactorId];
|
|
470
|
-
type MultiFactorAuthEnrollmentFormProps = {
|
|
471
|
-
onEnrollment?: () => void;
|
|
472
|
-
hints?: Hint[];
|
|
473
|
-
};
|
|
474
|
-
declare function MultiFactorAuthEnrollmentForm(props: MultiFactorAuthEnrollmentFormProps): react_jsx_runtime.JSX.Element;
|
|
475
|
-
|
|
476
|
-
type MultiFactorAuthEnrollmentScreenProps = MultiFactorAuthEnrollmentFormProps;
|
|
477
|
-
declare function MultiFactorAuthEnrollmentScreen(props: MultiFactorAuthEnrollmentScreenProps): react_jsx_runtime.JSX.Element;
|
|
478
|
-
|
|
479
|
-
declare function useSmsMultiFactorAssertionPhoneFormAction(): ({ hint, recaptchaVerifier }: {
|
|
480
|
-
hint: MultiFactorInfo;
|
|
481
|
-
recaptchaVerifier: RecaptchaVerifier;
|
|
482
|
-
}) => Promise<string>;
|
|
483
|
-
declare function useSmsMultiFactorAssertionVerifyFormAction(): ({ verificationId, verificationCode }: {
|
|
484
|
-
verificationId: string;
|
|
485
|
-
verificationCode: string;
|
|
486
|
-
}) => Promise<firebase_auth.UserCredential | undefined>;
|
|
487
|
-
type SmsMultiFactorAssertionFormProps = {
|
|
488
|
-
hint: MultiFactorInfo;
|
|
489
|
-
onSuccess?: () => void;
|
|
490
|
-
};
|
|
491
|
-
declare function SmsMultiFactorAssertionForm(props: SmsMultiFactorAssertionFormProps): react_jsx_runtime.JSX.Element;
|
|
492
|
-
|
|
493
|
-
declare function useTotpMultiFactorAssertionFormAction(): ({ verificationCode, hint }: {
|
|
494
|
-
verificationCode: string;
|
|
495
|
-
hint: MultiFactorInfo;
|
|
496
|
-
}) => Promise<firebase_auth.UserCredential | undefined>;
|
|
497
|
-
type TotpMultiFactorAssertionFormProps = {
|
|
498
|
-
hint: MultiFactorInfo;
|
|
499
|
-
onSuccess?: () => void;
|
|
500
|
-
};
|
|
501
|
-
declare function TotpMultiFactorAssertionForm(props: TotpMultiFactorAssertionFormProps): react_jsx_runtime.JSX.Element;
|
|
502
|
-
|
|
503
1261
|
/**
|
|
504
|
-
*
|
|
1262
|
+
* A button component for signing in with an OAuth provider.
|
|
1263
|
+
*
|
|
1264
|
+
* @returns The OAuth button component.
|
|
505
1265
|
*/
|
|
506
|
-
declare function
|
|
507
|
-
declare function useRedirectError(): string | undefined;
|
|
508
|
-
declare function useSignInAuthFormSchema(): zod.ZodObject<{
|
|
509
|
-
email: zod.ZodEmail;
|
|
510
|
-
password: zod.ZodString;
|
|
511
|
-
}, zod_v4_core.$strip>;
|
|
512
|
-
declare function useSignUpAuthFormSchema(): zod.ZodObject<{
|
|
513
|
-
email: zod.ZodEmail;
|
|
514
|
-
password: zod.ZodString;
|
|
515
|
-
displayName: zod.ZodString | zod.ZodOptional<zod.ZodString>;
|
|
516
|
-
}, zod_v4_core.$strip>;
|
|
517
|
-
declare function useForgotPasswordAuthFormSchema(): zod.ZodObject<{
|
|
518
|
-
email: zod.ZodEmail;
|
|
519
|
-
}, zod_v4_core.$strip>;
|
|
520
|
-
declare function useEmailLinkAuthFormSchema(): zod.ZodObject<{
|
|
521
|
-
email: zod.ZodEmail;
|
|
522
|
-
}, zod_v4_core.$strip>;
|
|
523
|
-
declare function usePhoneAuthNumberFormSchema(): zod.ZodObject<{
|
|
524
|
-
phoneNumber: zod.ZodString;
|
|
525
|
-
}, zod_v4_core.$strip>;
|
|
526
|
-
declare function usePhoneAuthVerifyFormSchema(): zod.ZodObject<{
|
|
527
|
-
verificationId: zod.ZodString;
|
|
528
|
-
verificationCode: zod.ZodString;
|
|
529
|
-
}, zod_v4_core.$strip>;
|
|
530
|
-
declare function useMultiFactorPhoneAuthNumberFormSchema(): zod.ZodObject<{
|
|
531
|
-
phoneNumber: zod.ZodString;
|
|
532
|
-
displayName: zod.ZodString;
|
|
533
|
-
}, zod_v4_core.$strip>;
|
|
534
|
-
declare function useMultiFactorPhoneAuthVerifyFormSchema(): zod.ZodObject<{
|
|
535
|
-
verificationId: zod.ZodString;
|
|
536
|
-
verificationCode: zod.ZodString;
|
|
537
|
-
}, zod_v4_core.$strip>;
|
|
538
|
-
declare function useMultiFactorTotpAuthNumberFormSchema(): zod.ZodObject<{
|
|
539
|
-
displayName: zod.ZodString;
|
|
540
|
-
}, zod_v4_core.$strip>;
|
|
541
|
-
declare function useMultiFactorTotpAuthVerifyFormSchema(): zod.ZodObject<{
|
|
542
|
-
verificationCode: zod.ZodString;
|
|
543
|
-
}, zod_v4_core.$strip>;
|
|
544
|
-
declare function useRecaptchaVerifier(ref: React.RefObject<HTMLDivElement | null>): RecaptchaVerifier | null;
|
|
1266
|
+
declare function OAuthButton({ provider, children, themed, onSignIn }: OAuthButtonProps): react_jsx_runtime.JSX.Element;
|
|
545
1267
|
|
|
1268
|
+
/** Props for the Button component. */
|
|
546
1269
|
type ButtonProps = ComponentProps<"button"> & {
|
|
1270
|
+
/** The visual variant of the button. */
|
|
547
1271
|
variant?: ButtonVariant;
|
|
1272
|
+
/** If true, the button will render as a child component using Radix UI's Slot. */
|
|
548
1273
|
asChild?: boolean;
|
|
549
1274
|
};
|
|
1275
|
+
/**
|
|
1276
|
+
* A customizable button component with multiple variants.
|
|
1277
|
+
*
|
|
1278
|
+
* @returns The button component.
|
|
1279
|
+
*/
|
|
550
1280
|
declare function Button({ className, variant, asChild, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
551
1281
|
|
|
1282
|
+
/** Props for the Card component. */
|
|
552
1283
|
type CardProps = PropsWithChildren<ComponentProps<"div">>;
|
|
1284
|
+
/**
|
|
1285
|
+
* A card container component for grouping related content.
|
|
1286
|
+
*
|
|
1287
|
+
* @returns The card component.
|
|
1288
|
+
*/
|
|
553
1289
|
declare function Card({ children, className, ...props }: CardProps): react_jsx_runtime.JSX.Element;
|
|
1290
|
+
/**
|
|
1291
|
+
* The header section of a card.
|
|
1292
|
+
*
|
|
1293
|
+
* @returns The card header component.
|
|
1294
|
+
*/
|
|
554
1295
|
declare function CardHeader({ children, className, ...props }: CardProps): react_jsx_runtime.JSX.Element;
|
|
1296
|
+
/**
|
|
1297
|
+
* The title of a card.
|
|
1298
|
+
*
|
|
1299
|
+
* @returns The card title component.
|
|
1300
|
+
*/
|
|
555
1301
|
declare function CardTitle({ children, className, ...props }: ComponentProps<"h2">): react_jsx_runtime.JSX.Element;
|
|
1302
|
+
/**
|
|
1303
|
+
* The subtitle of a card.
|
|
1304
|
+
*
|
|
1305
|
+
* @returns The card subtitle component.
|
|
1306
|
+
*/
|
|
556
1307
|
declare function CardSubtitle({ children, className, ...props }: ComponentProps<"p">): react_jsx_runtime.JSX.Element;
|
|
1308
|
+
/**
|
|
1309
|
+
* The content section of a card.
|
|
1310
|
+
*
|
|
1311
|
+
* @returns The card content component.
|
|
1312
|
+
*/
|
|
557
1313
|
declare function CardContent({ children, className, ...props }: ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
558
1314
|
|
|
1315
|
+
/** Ref methods for the CountrySelector component. */
|
|
559
1316
|
interface CountrySelectorRef {
|
|
1317
|
+
/** Gets the currently selected country. */
|
|
560
1318
|
getCountry: () => CountryData;
|
|
1319
|
+
/** Sets the selected country by country code. */
|
|
561
1320
|
setCountry: (code: CountryCode) => void;
|
|
562
1321
|
}
|
|
1322
|
+
/** Props for the CountrySelector component. */
|
|
563
1323
|
type CountrySelectorProps = ComponentProps<"div">;
|
|
1324
|
+
/**
|
|
1325
|
+
* Gets the list of allowed countries from the country codes behavior.
|
|
1326
|
+
*
|
|
1327
|
+
* @returns The list of allowed countries.
|
|
1328
|
+
*/
|
|
564
1329
|
declare function useCountries(): ({
|
|
565
1330
|
readonly name: "Afghanistan";
|
|
566
1331
|
readonly dialCode: "+93";
|
|
@@ -1792,6 +2557,11 @@ declare function useCountries(): ({
|
|
|
1792
2557
|
readonly code: "AX";
|
|
1793
2558
|
readonly emoji: "🇦🇽";
|
|
1794
2559
|
})[];
|
|
2560
|
+
/**
|
|
2561
|
+
* Gets the default country from the country codes behavior.
|
|
2562
|
+
*
|
|
2563
|
+
* @returns The default country data.
|
|
2564
|
+
*/
|
|
1795
2565
|
declare function useDefaultCountry(): {
|
|
1796
2566
|
readonly name: "Afghanistan";
|
|
1797
2567
|
readonly dialCode: "+93";
|
|
@@ -3023,19 +3793,40 @@ declare function useDefaultCountry(): {
|
|
|
3023
3793
|
readonly code: "AX";
|
|
3024
3794
|
readonly emoji: "🇦🇽";
|
|
3025
3795
|
};
|
|
3796
|
+
/**
|
|
3797
|
+
* A country selector component for phone number input.
|
|
3798
|
+
*
|
|
3799
|
+
* Displays a dropdown with country flags, dial codes, and names for selecting a country.
|
|
3800
|
+
*
|
|
3801
|
+
* @param ref - A ref to access the country selector methods.
|
|
3802
|
+
* @returns The country selector component.
|
|
3803
|
+
*/
|
|
3026
3804
|
declare const CountrySelector: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<CountrySelectorRef>>;
|
|
3027
3805
|
|
|
3806
|
+
/** Props for the Divider component. */
|
|
3028
3807
|
type DividerProps = PropsWithChildren<ComponentProps<"div">>;
|
|
3808
|
+
/**
|
|
3809
|
+
* A divider component that can display a line or a line with text in the middle.
|
|
3810
|
+
*
|
|
3811
|
+
* @returns The divider component.
|
|
3812
|
+
*/
|
|
3029
3813
|
declare function Divider({ className, children, ...props }: DividerProps): react_jsx_runtime.JSX.Element;
|
|
3030
3814
|
|
|
3031
|
-
declare function Input({ children, before, label, action, ...props }: PropsWithChildren<ComponentProps<"input"> & {
|
|
3815
|
+
declare function Input({ children, before, label, action, description, ...props }: PropsWithChildren<ComponentProps<"input"> & {
|
|
3032
3816
|
label: string;
|
|
3033
3817
|
before?: ReactNode;
|
|
3034
3818
|
action?: ReactNode;
|
|
3819
|
+
description?: ReactNode;
|
|
3035
3820
|
}>): react_jsx_runtime.JSX.Element;
|
|
3036
3821
|
declare function Action({ className, ...props }: ComponentProps<"button">): react_jsx_runtime.JSX.Element;
|
|
3037
3822
|
declare function SubmitButton(props: ComponentProps<"button">): react_jsx_runtime.JSX.Element;
|
|
3038
3823
|
declare function ErrorMessage(): react_jsx_runtime.JSX.Element;
|
|
3824
|
+
/**
|
|
3825
|
+
* A form hook factory for creating forms with validation and error handling.
|
|
3826
|
+
*
|
|
3827
|
+
* Provides field components (Input) and form components (SubmitButton, ErrorMessage, Action)
|
|
3828
|
+
* for building accessible forms with TanStack Form.
|
|
3829
|
+
*/
|
|
3039
3830
|
declare const form: {
|
|
3040
3831
|
useAppForm: <TFormData, TOnMount extends _tanstack_react_form.FormValidateOrFn<TFormData> | undefined, TOnChange extends _tanstack_react_form.FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends _tanstack_react_form.FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends _tanstack_react_form.FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends _tanstack_react_form.FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends _tanstack_react_form.FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends _tanstack_react_form.FormAsyncValidateOrFn<TFormData> | undefined, TOnDynamic extends _tanstack_react_form.FormValidateOrFn<TFormData> | undefined, TOnDynamicAsync extends _tanstack_react_form.FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends _tanstack_react_form.FormAsyncValidateOrFn<TFormData> | undefined, TSubmitMeta>(props: _tanstack_react_form.FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>) => _tanstack_react_form.AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
|
|
3041
3832
|
readonly Input: typeof Input;
|
|
@@ -3083,11 +3874,200 @@ declare const form: {
|
|
|
3083
3874
|
}>) => react.JSX.Element;
|
|
3084
3875
|
};
|
|
3085
3876
|
|
|
3877
|
+
/**
|
|
3878
|
+
* Copyright 2025 Google LLC
|
|
3879
|
+
*
|
|
3880
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3881
|
+
* you may not use this file except in compliance with the License.
|
|
3882
|
+
* You may obtain a copy of the License at
|
|
3883
|
+
*
|
|
3884
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3885
|
+
*
|
|
3886
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3887
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3888
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3889
|
+
* See the License for the specific language governing permissions and
|
|
3890
|
+
* limitations under the License.
|
|
3891
|
+
*/
|
|
3892
|
+
/** A URL for a policy document (terms of service or privacy policy). */
|
|
3893
|
+
type PolicyURL = string | URL;
|
|
3894
|
+
/** Configuration for terms of service and privacy policy links. */
|
|
3895
|
+
interface PolicyProps {
|
|
3896
|
+
/** The URL to the terms of service page. */
|
|
3897
|
+
termsOfServiceUrl: PolicyURL;
|
|
3898
|
+
/** The URL to the privacy policy page. */
|
|
3899
|
+
privacyPolicyUrl: PolicyURL;
|
|
3900
|
+
/** Optional callback function for handling navigation to policy pages. */
|
|
3901
|
+
onNavigate?: (url: PolicyURL) => void;
|
|
3902
|
+
}
|
|
3903
|
+
declare const PolicyContext: react.Context<PolicyProps | undefined>;
|
|
3904
|
+
/**
|
|
3905
|
+
* Displays terms of service and privacy policy links.
|
|
3906
|
+
*
|
|
3907
|
+
* The links are formatted according to the translated message template which may contain
|
|
3908
|
+
* placeholders like {tos} and {privacy}.
|
|
3909
|
+
*
|
|
3910
|
+
* Returns null if no policy configuration is provided.
|
|
3911
|
+
*
|
|
3912
|
+
* @returns The policies component, or null if no policies are configured.
|
|
3913
|
+
*/
|
|
3914
|
+
declare function Policies(): react_jsx_runtime.JSX.Element | null;
|
|
3915
|
+
|
|
3916
|
+
/**
|
|
3917
|
+
* Copyright 2025 Google LLC
|
|
3918
|
+
*
|
|
3919
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3920
|
+
* you may not use this file except in compliance with the License.
|
|
3921
|
+
* You may obtain a copy of the License at
|
|
3922
|
+
*
|
|
3923
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3924
|
+
*
|
|
3925
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3926
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3927
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3928
|
+
* See the License for the specific language governing permissions and
|
|
3929
|
+
* limitations under the License.
|
|
3930
|
+
*/
|
|
3931
|
+
/**
|
|
3932
|
+
* Displays any error that occurred during a redirect-based authentication flow.
|
|
3933
|
+
*
|
|
3934
|
+
* Returns null if there is no redirect error.
|
|
3935
|
+
*
|
|
3936
|
+
* @returns The redirect error component, or null if there is no error.
|
|
3937
|
+
*/
|
|
3938
|
+
declare function RedirectError(): react_jsx_runtime.JSX.Element | null;
|
|
3939
|
+
|
|
3940
|
+
/** Props for the FirebaseUIProvider component. */
|
|
3086
3941
|
type FirebaseUIProviderProps = {
|
|
3942
|
+
/** The child components to render. */
|
|
3087
3943
|
children: React.ReactNode;
|
|
3944
|
+
/** The FirebaseUI store instance. */
|
|
3088
3945
|
ui: FirebaseUIStore;
|
|
3946
|
+
/** Optional policy configuration for terms of service and privacy policy links. */
|
|
3089
3947
|
policies?: PolicyProps;
|
|
3090
3948
|
};
|
|
3949
|
+
/**
|
|
3950
|
+
* Provides FirebaseUI context to all child components.
|
|
3951
|
+
*
|
|
3952
|
+
* This provider must wrap your application or the components that use FirebaseUI hooks.
|
|
3953
|
+
*
|
|
3954
|
+
* @returns The provider component.
|
|
3955
|
+
*/
|
|
3091
3956
|
declare function FirebaseUIProvider({ children, ui, policies }: FirebaseUIProviderProps): react_jsx_runtime.JSX.Element;
|
|
3092
3957
|
|
|
3093
|
-
|
|
3958
|
+
/**
|
|
3959
|
+
* Gets the FirebaseUI instance from the React context.
|
|
3960
|
+
*
|
|
3961
|
+
* @returns The FirebaseUI instance from the context.
|
|
3962
|
+
* @throws {Error} Throws an error if the hook is used outside of a FirebaseUIProvider.
|
|
3963
|
+
*/
|
|
3964
|
+
declare function useUI(): _firebase_oss_ui_core.FirebaseUI;
|
|
3965
|
+
/**
|
|
3966
|
+
* Sets up a callback that is called when a user is authenticated (non-anonymous).
|
|
3967
|
+
*
|
|
3968
|
+
* @param callback - Optional callback function that receives the authenticated user.
|
|
3969
|
+
*/
|
|
3970
|
+
declare function useOnUserAuthenticated(callback?: (user: User) => void): void;
|
|
3971
|
+
/**
|
|
3972
|
+
* Gets the redirect error message, if any, from the FirebaseUI instance.
|
|
3973
|
+
*
|
|
3974
|
+
* @returns The error message as a string, or undefined if there is no redirect error.
|
|
3975
|
+
*/
|
|
3976
|
+
declare function useRedirectError(): string | undefined;
|
|
3977
|
+
/**
|
|
3978
|
+
* Gets a memoized Zod schema for sign-in form validation.
|
|
3979
|
+
*
|
|
3980
|
+
* @returns A Zod schema for sign-in form validation.
|
|
3981
|
+
*/
|
|
3982
|
+
declare function useSignInAuthFormSchema(): zod.ZodObject<{
|
|
3983
|
+
email: zod.ZodEmail;
|
|
3984
|
+
password: zod.ZodString;
|
|
3985
|
+
}, zod_v4_core.$strip>;
|
|
3986
|
+
/**
|
|
3987
|
+
* Gets a memoized Zod schema for sign-up form validation.
|
|
3988
|
+
*
|
|
3989
|
+
* @returns A Zod schema for sign-up form validation.
|
|
3990
|
+
*/
|
|
3991
|
+
declare function useSignUpAuthFormSchema(): zod.ZodObject<{
|
|
3992
|
+
email: zod.ZodEmail;
|
|
3993
|
+
password: zod.ZodString;
|
|
3994
|
+
displayName: zod.ZodString | zod.ZodOptional<zod.ZodString>;
|
|
3995
|
+
}, zod_v4_core.$strip>;
|
|
3996
|
+
/**
|
|
3997
|
+
* Gets a memoized Zod schema for forgot password form validation.
|
|
3998
|
+
*
|
|
3999
|
+
* @returns A Zod schema for forgot password form validation.
|
|
4000
|
+
*/
|
|
4001
|
+
declare function useForgotPasswordAuthFormSchema(): zod.ZodObject<{
|
|
4002
|
+
email: zod.ZodEmail;
|
|
4003
|
+
}, zod_v4_core.$strip>;
|
|
4004
|
+
/**
|
|
4005
|
+
* Gets a memoized Zod schema for email link authentication form validation.
|
|
4006
|
+
*
|
|
4007
|
+
* @returns A Zod schema for email link authentication form validation.
|
|
4008
|
+
*/
|
|
4009
|
+
declare function useEmailLinkAuthFormSchema(): zod.ZodObject<{
|
|
4010
|
+
email: zod.ZodEmail;
|
|
4011
|
+
}, zod_v4_core.$strip>;
|
|
4012
|
+
/**
|
|
4013
|
+
* Gets a memoized Zod schema for phone number form validation.
|
|
4014
|
+
*
|
|
4015
|
+
* @returns A Zod schema for phone number form validation.
|
|
4016
|
+
*/
|
|
4017
|
+
declare function usePhoneAuthNumberFormSchema(): zod.ZodObject<{
|
|
4018
|
+
phoneNumber: zod.ZodString;
|
|
4019
|
+
}, zod_v4_core.$strip>;
|
|
4020
|
+
/**
|
|
4021
|
+
* Gets a memoized Zod schema for phone verification code form validation.
|
|
4022
|
+
*
|
|
4023
|
+
* @returns A Zod schema for phone verification form validation.
|
|
4024
|
+
*/
|
|
4025
|
+
declare function usePhoneAuthVerifyFormSchema(): zod.ZodObject<{
|
|
4026
|
+
verificationId: zod.ZodString;
|
|
4027
|
+
verificationCode: zod.ZodString;
|
|
4028
|
+
}, zod_v4_core.$strip>;
|
|
4029
|
+
/**
|
|
4030
|
+
* Gets a memoized Zod schema for multi-factor phone authentication number form validation.
|
|
4031
|
+
*
|
|
4032
|
+
* @returns A Zod schema for multi-factor phone authentication number form validation.
|
|
4033
|
+
*/
|
|
4034
|
+
declare function useMultiFactorPhoneAuthNumberFormSchema(): zod.ZodObject<{
|
|
4035
|
+
phoneNumber: zod.ZodString;
|
|
4036
|
+
displayName: zod.ZodString;
|
|
4037
|
+
}, zod_v4_core.$strip>;
|
|
4038
|
+
/**
|
|
4039
|
+
* Gets a memoized Zod schema for multi-factor phone authentication verification form validation.
|
|
4040
|
+
*
|
|
4041
|
+
* @returns A Zod schema for multi-factor phone authentication verification form validation.
|
|
4042
|
+
*/
|
|
4043
|
+
declare function useMultiFactorPhoneAuthVerifyFormSchema(): zod.ZodObject<{
|
|
4044
|
+
verificationId: zod.ZodString;
|
|
4045
|
+
verificationCode: zod.ZodString;
|
|
4046
|
+
}, zod_v4_core.$strip>;
|
|
4047
|
+
/**
|
|
4048
|
+
* Gets a memoized Zod schema for multi-factor TOTP authentication number form validation.
|
|
4049
|
+
*
|
|
4050
|
+
* @returns A Zod schema for multi-factor TOTP authentication number form validation.
|
|
4051
|
+
*/
|
|
4052
|
+
declare function useMultiFactorTotpAuthNumberFormSchema(): zod.ZodObject<{
|
|
4053
|
+
displayName: zod.ZodString;
|
|
4054
|
+
}, zod_v4_core.$strip>;
|
|
4055
|
+
/**
|
|
4056
|
+
* Gets a memoized Zod schema for multi-factor TOTP authentication verification form validation.
|
|
4057
|
+
*
|
|
4058
|
+
* @returns A Zod schema for multi-factor TOTP authentication verification form validation.
|
|
4059
|
+
*/
|
|
4060
|
+
declare function useMultiFactorTotpAuthVerifyFormSchema(): zod.ZodObject<{
|
|
4061
|
+
verificationCode: zod.ZodString;
|
|
4062
|
+
}, zod_v4_core.$strip>;
|
|
4063
|
+
/**
|
|
4064
|
+
* Creates and manages a reCAPTCHA verifier instance for phone authentication.
|
|
4065
|
+
*
|
|
4066
|
+
* The verifier is automatically rendered to the provided element and cleaned up when the element changes.
|
|
4067
|
+
*
|
|
4068
|
+
* @param ref - A React ref to the HTML element where the reCAPTCHA should be rendered.
|
|
4069
|
+
* @returns The reCAPTCHA verifier instance, or null if the element is not available.
|
|
4070
|
+
*/
|
|
4071
|
+
declare function useRecaptchaVerifier(ref: React.RefObject<HTMLDivElement | null>): RecaptchaVerifier | null;
|
|
4072
|
+
|
|
4073
|
+
export { AppleLogo, AppleSignInButton, type AppleSignInButtonProps, Button, type ButtonProps, Card, CardContent, CardHeader, type CardProps, CardSubtitle, CardTitle, CountrySelector, type CountrySelectorProps, type CountrySelectorRef, Divider, type DividerProps, EmailLinkAuthForm, type EmailLinkAuthFormProps, EmailLinkAuthScreen, type EmailLinkAuthScreenProps, FacebookLogo, FacebookSignInButton, type FacebookSignInButtonProps, FirebaseUIProvider, type FirebaseUIProviderProps, ForgotPasswordAuthForm, type ForgotPasswordAuthFormProps, ForgotPasswordAuthScreen, type ForgotPasswordAuthScreenProps, GitHubLogo, GitHubSignInButton, type GitHubSignInButtonProps, GoogleLogo, GoogleSignInButton, type GoogleSignInButtonProps, MicrosoftLogo, MicrosoftSignInButton, type MicrosoftSignInButtonProps, MultiFactorAuthAssertionForm, type MultiFactorAuthAssertionFormProps, MultiFactorAuthAssertionScreen, type MultiFactorAuthAssertionScreenProps, MultiFactorAuthEnrollmentForm, type MultiFactorAuthEnrollmentFormProps, MultiFactorAuthEnrollmentScreen, type MultiFactorAuthEnrollmentScreenProps, MultiFactorEnrollmentVerifyPhoneNumberForm, MultiFactorEnrollmentVerifyTotpForm, OAuthButton, type OAuthButtonProps, OAuthScreen, type OAuthScreenProps, PhoneAuthForm, type PhoneAuthFormProps, PhoneAuthScreen, type PhoneAuthScreenProps, Policies, PolicyContext, type PolicyProps, type PolicyURL, RedirectError, SignInAuthForm, type SignInAuthFormProps, SignInAuthScreen, type SignInAuthScreenProps, SignUpAuthForm, type SignUpAuthFormProps, SignUpAuthScreen, type SignUpAuthScreenProps, SmsMultiFactorAssertionForm, type SmsMultiFactorAssertionFormProps, SmsMultiFactorEnrollmentForm, type SmsMultiFactorEnrollmentFormProps, TotpMultiFactorAssertionForm, type TotpMultiFactorAssertionFormProps, TotpMultiFactorEnrollmentForm, type TotpMultiFactorEnrollmentFormProps, TwitterLogo, TwitterSignInButton, type TwitterSignInButtonProps, type UseSmsMultiFactorEnrollmentPhoneNumberForm, type UseTotpMultiFactorAssertionForm, type UseTotpMultiFactorEnrollmentForm, form, useCountries, useDefaultCountry, useEmailLinkAuthForm, useEmailLinkAuthFormAction, useEmailLinkAuthFormCompleteSignIn, useEmailLinkAuthFormSchema, useForgotPasswordAuthForm, useForgotPasswordAuthFormAction, useForgotPasswordAuthFormSchema, useMultiFactorAssertionCleanup, useMultiFactorEnrollmentVerifyPhoneNumberForm, useMultiFactorEnrollmentVerifyPhoneNumberFormAction, useMultiFactorEnrollmentVerifyTotpForm, useMultiFactorEnrollmentVerifyTotpFormAction, useMultiFactorPhoneAuthNumberFormSchema, useMultiFactorPhoneAuthVerifyFormSchema, useMultiFactorTotpAuthNumberFormSchema, useMultiFactorTotpAuthVerifyFormSchema, useOnUserAuthenticated, usePhoneAuthNumberFormSchema, usePhoneAuthVerifyFormSchema, usePhoneNumberForm, usePhoneNumberFormAction, useRecaptchaVerifier, useRedirectError, useRequireDisplayName, useSignInAuthForm, useSignInAuthFormAction, useSignInAuthFormSchema, useSignInWithProvider, useSignUpAuthForm, useSignUpAuthFormAction, useSignUpAuthFormSchema, useSmsMultiFactorAssertionPhoneFormAction, useSmsMultiFactorAssertionVerifyFormAction, useSmsMultiFactorEnrollmentPhoneAuthFormAction, useSmsMultiFactorEnrollmentPhoneNumberForm, useTotpMultiFactorAssertionForm, useTotpMultiFactorAssertionFormAction, useTotpMultiFactorSecretGenerationForm, useTotpMultiFactorSecretGenerationFormAction, useUI, useVerifyPhoneNumberForm, useVerifyPhoneNumberFormAction };
|