@@ -58,6 +58,7 @@ export function applyActionCode(auth: Auth, oobCode: string): Promise<void>;
58
58
* @param auth - The Auth instance.
59
59
* @param callback - A callback function to run before the auth state changes.
60
60
* @param onAbort - Optional. A callback function to run if the operation is aborted.
61
+ *
61
62
*/
62
63
export function beforeAuthStateChanged (
63
64
auth : Auth ,
@@ -148,14 +149,21 @@ export function getMultiFactorResolver(
148
149
* @param resolver - Optional. The popup redirect resolver.
149
150
* @returns A promise that resolves with the user credentials or null.
150
151
*/
151
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
152
- export interface PopupRedirectResolver { }
153
-
154
152
export function getRedirectResult (
155
153
auth : Auth ,
156
154
resolver ?: PopupRedirectResolver ,
157
155
) : Promise < FirebaseAuthTypes . UserCredential | null > ;
158
156
157
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
158
+ export interface PopupRedirectResolver { }
159
+
160
+ /**
161
+ * Loads the reCAPTCHA configuration into the Auth instance.
162
+ * Does not work in a Node.js environment
163
+ * @param auth - The Auth instance.
164
+ */
165
+ export function initializeRecaptchaConfig ( auth : Auth ) : Promise < void > ;
166
+
159
167
/**
160
168
* Checks if an incoming link is a sign-in with email link suitable for signInWithEmailLink().
161
169
*
@@ -189,6 +197,13 @@ export function onIdTokenChanged(
189
197
nextOrObserver : CallbackOrObserver < AuthListenerCallback > ,
190
198
) : ( ) => void ;
191
199
200
+ /**
201
+ * Revoke the given access token, Currently only supports Apple OAuth access tokens.
202
+ * @param auth
203
+ * @param token
204
+ */
205
+ export declare function revokeAccessToken ( auth : Auth , token : string ) : Promise < void > ;
206
+
192
207
/**
193
208
* Sends a password reset email to the given email address.
194
209
*
@@ -208,7 +223,7 @@ export function sendPasswordResetEmail(
208
223
*
209
224
* @param auth - The Auth instance.
210
225
* @param email - The user's email address.
211
- * @param actionCodeSettings - Optional. Action code settings.
226
+ * @param actionCodeSettings - Optional, Action code settings.
212
227
* @returns A promise that resolves when the email is sent.
213
228
*/
214
229
export function sendSignInLinkToEmail (
@@ -300,7 +315,7 @@ export function signInWithEmailLink(
300
315
* Interface representing an application verifier.
301
316
*/
302
317
export interface ApplicationVerifier {
303
- type : string ;
318
+ readonly type : string ;
304
319
verify ( ) : Promise < string > ;
305
320
}
306
321
@@ -309,13 +324,15 @@ export interface ApplicationVerifier {
309
324
*
310
325
* @param auth - The Auth instance.
311
326
* @param phoneNumber - The user's phone number.
312
- * @param appVerifier - The application verifier.
327
+ * @param appVerifier - Optional. The application verifier.
328
+ * @param forceResend - Optional. (Native only) Forces a new message to be sent if it was already recently sent.
313
329
* @returns A promise that resolves with the confirmation result.
314
330
*/
315
331
export function signInWithPhoneNumber (
316
332
auth : Auth ,
317
333
phoneNumber : string ,
318
- appVerifier : ApplicationVerifier ,
334
+ appVerifier ?: ApplicationVerifier ,
335
+ forceResend ?: boolean ,
319
336
) : Promise < FirebaseAuthTypes . ConfirmationResult > ;
320
337
321
338
/**
@@ -360,7 +377,7 @@ export function signInWithRedirect(
360
377
auth : Auth ,
361
378
provider : FirebaseAuthTypes . AuthProvider ,
362
379
resolver ?: PopupRedirectResolver ,
363
- ) : Promise < void > ;
380
+ ) : Promise < never > ;
364
381
365
382
/**
366
383
* Signs out the current user.
@@ -377,7 +394,7 @@ export function signOut(auth: Auth): Promise<void>;
377
394
* @param user - The user to set as the current user.
378
395
* @returns A promise that resolves when the user is set.
379
396
*/
380
- export function updateCurrentUser ( auth : Auth , user : FirebaseAuthTypes . User ) : Promise < void > ;
397
+ export function updateCurrentUser ( auth : Auth , user : FirebaseAuthTypes . User | null ) : Promise < void > ;
381
398
382
399
/**
383
400
* Sets the current language to the default device/browser preference.
@@ -386,6 +403,15 @@ export function updateCurrentUser(auth: Auth, user: FirebaseAuthTypes.User): Pro
386
403
*/
387
404
export function useDeviceLanguage ( auth : Auth ) : void ;
388
405
406
+ /**
407
+ * Validates the password against the password policy configured for the project or tenant.
408
+ *
409
+ * @param auth - The Auth instance.
410
+ * @param password - The password to validate.
411
+ *
412
+ */
413
+ export function validatePassword ( auth : Auth , password : string ) : Promise < PasswordValidationStatus > ;
414
+
389
415
/**
390
416
* Sets the current language to the default device/browser preference.
391
417
*
@@ -464,7 +490,7 @@ export function linkWithCredential(
464
490
export function linkWithPhoneNumber (
465
491
user : FirebaseAuthTypes . User ,
466
492
phoneNumber : string ,
467
- appVerifier : ApplicationVerifier ,
493
+ appVerifier ? : ApplicationVerifier ,
468
494
) : Promise < FirebaseAuthTypes . ConfirmationResult > ;
469
495
470
496
/**
@@ -526,7 +552,7 @@ export function reauthenticateWithCredential(
526
552
export function reauthenticateWithPhoneNumber (
527
553
user : FirebaseAuthTypes . User ,
528
554
phoneNumber : string ,
529
- appVerifier : ApplicationVerifier ,
555
+ appVerifier ? : ApplicationVerifier ,
530
556
) : Promise < FirebaseAuthTypes . ConfirmationResult > ;
531
557
532
558
/**
@@ -642,7 +668,7 @@ export function updateProfile(
642
668
export function verifyBeforeUpdateEmail (
643
669
user : FirebaseAuthTypes . User ,
644
670
newEmail : string ,
645
- actionCodeSettings ?: FirebaseAuthTypes . ActionCodeSettings ,
671
+ actionCodeSettings ?: FirebaseAuthTypes . ActionCodeSettings | null ,
646
672
) : Promise < void > ;
647
673
648
674
/**
@@ -659,6 +685,23 @@ export function getAdditionalUserInfo(
659
685
* Returns the custom auth domain for the auth instance.
660
686
*
661
687
* @param auth - The Auth instance.
662
- * @returns A promise that resolves with the custom auth domain.
688
+ * @returns { Promise<string> } A promise that resolves with the custom auth domain.
663
689
*/
664
690
export function getCustomAuthDomain ( auth : Auth ) : Promise < string > ;
691
+
692
+ /**
693
+ * Various Providers.
694
+ *
695
+ *
696
+ */
697
+ export {
698
+ AppleAuthProvider ,
699
+ EmailAuthProvider ,
700
+ FacebookAuthProvider ,
701
+ GithubAuthProvider ,
702
+ GoogleAuthProvider ,
703
+ OAuthProvider ,
704
+ OIDCAuthProvider ,
705
+ PhoneAuthProvider ,
706
+ TwitterAuthProvider ,
707
+ } from '../index' ;
0 commit comments