@react-native-firebase/auth 22.2.0 → 22.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [22.3.0](https://github.com/invertase/react-native-firebase/compare/v22.2.1...v22.3.0) (2025-07-08)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **auth, ios:** correct useUserAccessGroup JSDoc ([#8543](https://github.com/invertase/react-native-firebase/issues/8543)) ([1324b4e](https://github.com/invertase/react-native-firebase/commit/1324b4e6757788de51c1f28bb45d8e2cd4d3d7a6))
11
+
12
+ ## [22.2.1](https://github.com/invertase/react-native-firebase/compare/v22.2.0...v22.2.1) (2025-06-10)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **auth, ios:** avoid inappropriate linking when host is nil ([#8517](https://github.com/invertase/react-native-firebase/issues/8517)) ([f0cba0b](https://github.com/invertase/react-native-firebase/commit/f0cba0bdc0eb36693cf77baa22e214b6cfa674eb))
17
+
6
18
  ## [22.2.0](https://github.com/invertase/react-native-firebase/compare/v22.1.0...v22.2.0) (2025-05-12)
7
19
 
8
20
  ### Bug Fixes
package/lib/index.d.ts CHANGED
@@ -279,6 +279,15 @@ export namespace FirebaseAuthTypes {
279
279
  * firebase.auth.X
280
280
  */
281
281
  export interface Statics {
282
+ /**
283
+ * Return the #{@link MultiFactorUser} instance for the current user.
284
+ */
285
+ multiFactor: multiFactor;
286
+ /**
287
+ * Try and obtain a #{@link MultiFactorResolver} instance based on an error.
288
+ * Returns null if no resolver object could be found.
289
+ *
290
+ */
282
291
  getMultiFactorResolver: getMultiFactorResolver;
283
292
  /**
284
293
  * Email and password auth provider implementation.
package/lib/index.js CHANGED
@@ -16,6 +16,7 @@
16
16
  */
17
17
 
18
18
  import {
19
+ createDeprecationProxy,
19
20
  isAndroid,
20
21
  isBoolean,
21
22
  isNull,
@@ -48,6 +49,13 @@ import version from './version';
48
49
  import fallBackModule from './web/RNFBAuthModule';
49
50
  import { warnDynamicLink } from './utils';
50
51
 
52
+ const PhoneAuthState = {
53
+ CODE_SENT: 'sent',
54
+ AUTO_VERIFY_TIMEOUT: 'timeout',
55
+ AUTO_VERIFIED: 'verified',
56
+ ERROR: 'error',
57
+ };
58
+
51
59
  export {
52
60
  AppleAuthProvider,
53
61
  EmailAuthProvider,
@@ -59,6 +67,7 @@ export {
59
67
  PhoneMultiFactorGenerator,
60
68
  OAuthProvider,
61
69
  OIDCAuthProvider,
70
+ PhoneAuthState,
62
71
  };
63
72
 
64
73
  const statics = {
@@ -72,12 +81,7 @@ const statics = {
72
81
  PhoneMultiFactorGenerator,
73
82
  OAuthProvider,
74
83
  OIDCAuthProvider,
75
- PhoneAuthState: {
76
- CODE_SENT: 'sent',
77
- AUTO_VERIFY_TIMEOUT: 'timeout',
78
- AUTO_VERIFIED: 'verified',
79
- ERROR: 'error',
80
- },
84
+ PhoneAuthState,
81
85
  getMultiFactorResolver,
82
86
  multiFactor,
83
87
  };
@@ -173,14 +177,14 @@ class FirebaseAuthModule extends FirebaseModule {
173
177
  }
174
178
 
175
179
  _setUser(user) {
176
- this._user = user ? new User(this, user) : null;
180
+ this._user = user ? createDeprecationProxy(new User(this, user)) : null;
177
181
  this._authResult = true;
178
182
  this.emitter.emit(this.eventNameForApp('onUserChanged'), this._user);
179
183
  return this._user;
180
184
  }
181
185
 
182
186
  _setUserCredential(userCredential) {
183
- const user = new User(this, userCredential.user);
187
+ const user = createDeprecationProxy(new User(this, userCredential.user));
184
188
  this._user = user;
185
189
  this._authResult = true;
186
190
  this.emitter.emit(this.eventNameForApp('onUserChanged'), this._user);
@@ -404,6 +404,21 @@ export function updateCurrentUser(auth: Auth, user: FirebaseAuthTypes.User | nul
404
404
  */
405
405
  export function useDeviceLanguage(auth: Auth): void;
406
406
 
407
+ /**
408
+ * Sets the language code.
409
+ *
410
+ * #### Example
411
+ *
412
+ * ```js
413
+ * // Set language to French
414
+ * await firebase.auth().setLanguageCode('fr');
415
+ * ```
416
+ * @param auth - The Auth instance.
417
+ * @param languageCode An ISO language code.
418
+ * 'null' value will set the language code to the app's current language.
419
+ */
420
+ export function setLanguageCode(auth: Auth, languageCode: string | null): Promise<void>;
421
+
407
422
  /**
408
423
  * Validates the password against the password policy configured for the project or tenant.
409
424
  *
@@ -414,7 +429,7 @@ export function useDeviceLanguage(auth: Auth): void;
414
429
  export function validatePassword(auth: Auth, password: string): Promise<PasswordValidationStatus>;
415
430
 
416
431
  /**
417
- * Sets the current language to the default device/browser preference.
432
+ * Configures a shared user access group to sync auth state across multiple apps via the Keychain.
418
433
  *
419
434
  * @param auth - The Auth instance.
420
435
  * @param userAccessGroup - The user access group.
@@ -781,4 +796,5 @@ export {
781
796
  PhoneAuthProvider,
782
797
  PhoneMultiFactorGenerator,
783
798
  TwitterAuthProvider,
799
+ PhoneAuthState,
784
800
  } from '../index';
@@ -20,7 +20,7 @@ import { fetchPasswordPolicy } from '../password-policy/passwordPolicyApi';
20
20
  import { PasswordPolicyImpl } from '../password-policy/PasswordPolicyImpl';
21
21
  import FacebookAuthProvider from '../providers/FacebookAuthProvider';
22
22
  import { MultiFactorUser } from '../multiFactor';
23
- export { FacebookAuthProvider };
23
+ import { MODULAR_DEPRECATION_ARG } from '@react-native-firebase/app/lib/common';
24
24
 
25
25
  /**
26
26
  * @typedef {import('@firebase/app-types').FirebaseApp} FirebaseApp
@@ -77,7 +77,7 @@ export function initializeAuth(app, deps) {
77
77
  * @returns {Promise<void>}
78
78
  */
79
79
  export async function applyActionCode(auth, oobCode) {
80
- return auth.applyActionCode(oobCode);
80
+ return auth.applyActionCode.call(auth, oobCode, MODULAR_DEPRECATION_ARG);
81
81
  }
82
82
 
83
83
  /**
@@ -97,7 +97,7 @@ export function beforeAuthStateChanged(auth, callback, onAbort) {
97
97
  * @returns {Promise<ActionCodeInfo>}
98
98
  */
99
99
  export async function checkActionCode(auth, oobCode) {
100
- return auth.checkActionCode(oobCode);
100
+ return auth.checkActionCode.call(auth, oobCode, MODULAR_DEPRECATION_ARG);
101
101
  }
102
102
 
103
103
  /**
@@ -108,7 +108,7 @@ export async function checkActionCode(auth, oobCode) {
108
108
  * @returns {Promise<void>}
109
109
  */
110
110
  export async function confirmPasswordReset(auth, oobCode, newPassword) {
111
- return auth.confirmPasswordReset(oobCode, newPassword);
111
+ return auth.confirmPasswordReset.call(auth, oobCode, newPassword, MODULAR_DEPRECATION_ARG);
112
112
  }
113
113
 
114
114
  /**
@@ -118,7 +118,7 @@ export async function confirmPasswordReset(auth, oobCode, newPassword) {
118
118
  * @param {{ disableWarnings: boolean }} [options] - Optional. Options for the emulator connection.
119
119
  */
120
120
  export function connectAuthEmulator(auth, url, options) {
121
- auth.useEmulator(url, options);
121
+ auth.useEmulator.call(auth, url, options, MODULAR_DEPRECATION_ARG);
122
122
  }
123
123
 
124
124
  /**
@@ -129,7 +129,7 @@ export function connectAuthEmulator(auth, url, options) {
129
129
  * @returns {Promise<UserCredential>}
130
130
  */
131
131
  export async function createUserWithEmailAndPassword(auth, email, password) {
132
- return auth.createUserWithEmailAndPassword(email, password);
132
+ return auth.createUserWithEmailAndPassword.call(auth, email, password, MODULAR_DEPRECATION_ARG);
133
133
  }
134
134
 
135
135
  /**
@@ -139,7 +139,7 @@ export async function createUserWithEmailAndPassword(auth, email, password) {
139
139
  * @returns {Promise<string[]>}
140
140
  */
141
141
  export async function fetchSignInMethodsForEmail(auth, email) {
142
- return auth.fetchSignInMethodsForEmail(email);
142
+ return auth.fetchSignInMethodsForEmail.call(auth, email, MODULAR_DEPRECATION_ARG);
143
143
  }
144
144
 
145
145
  /**
@@ -149,7 +149,7 @@ export async function fetchSignInMethodsForEmail(auth, email) {
149
149
  * @returns {MultiFactorResolver}
150
150
  */
151
151
  export function getMultiFactorResolver(auth, error) {
152
- return auth.getMultiFactorResolver(error);
152
+ return auth.getMultiFactorResolver.call(auth, error, MODULAR_DEPRECATION_ARG);
153
153
  }
154
154
 
155
155
  /**
@@ -169,7 +169,7 @@ export async function getRedirectResult(auth, resolver) {
169
169
  * @returns {Promise<boolean>}
170
170
  */
171
171
  export function isSignInWithEmailLink(auth, emailLink) {
172
- return auth.isSignInWithEmailLink(emailLink);
172
+ return auth.isSignInWithEmailLink.call(auth, emailLink, MODULAR_DEPRECATION_ARG);
173
173
  }
174
174
 
175
175
  /**
@@ -179,7 +179,7 @@ export function isSignInWithEmailLink(auth, emailLink) {
179
179
  * @returns {() => void}
180
180
  */
181
181
  export function onAuthStateChanged(auth, nextOrObserver) {
182
- return auth.onAuthStateChanged(nextOrObserver);
182
+ return auth.onAuthStateChanged.call(auth, nextOrObserver, MODULAR_DEPRECATION_ARG);
183
183
  }
184
184
 
185
185
  /**
@@ -189,7 +189,7 @@ export function onAuthStateChanged(auth, nextOrObserver) {
189
189
  * @returns {() => void}
190
190
  */
191
191
  export function onIdTokenChanged(auth, nextOrObserver) {
192
- return auth.onIdTokenChanged(nextOrObserver);
192
+ return auth.onIdTokenChanged.call(auth, nextOrObserver, MODULAR_DEPRECATION_ARG);
193
193
  }
194
194
 
195
195
  /**
@@ -209,7 +209,7 @@ export async function revokeAccessToken(auth, token) {
209
209
  * @returns {Promise<void>}
210
210
  */
211
211
  export async function sendPasswordResetEmail(auth, email, actionCodeSettings) {
212
- return auth.sendPasswordResetEmail(email, actionCodeSettings);
212
+ return auth.sendPasswordResetEmail.call(auth, email, actionCodeSettings, MODULAR_DEPRECATION_ARG);
213
213
  }
214
214
 
215
215
  /**
@@ -220,7 +220,7 @@ export async function sendPasswordResetEmail(auth, email, actionCodeSettings) {
220
220
  * @returns {Promise<void>}
221
221
  */
222
222
  export async function sendSignInLinkToEmail(auth, email, actionCodeSettings) {
223
- return auth.sendSignInLinkToEmail(email, actionCodeSettings);
223
+ return auth.sendSignInLinkToEmail.call(auth, email, actionCodeSettings, MODULAR_DEPRECATION_ARG);
224
224
  }
225
225
 
226
226
  /**
@@ -239,7 +239,7 @@ export async function setPersistence(auth, persistence) {
239
239
  * @returns {Promise<UserCredential>}
240
240
  */
241
241
  export async function signInAnonymously(auth) {
242
- return auth.signInAnonymously();
242
+ return auth.signInAnonymously.call(auth, MODULAR_DEPRECATION_ARG);
243
243
  }
244
244
 
245
245
  /**
@@ -249,7 +249,7 @@ export async function signInAnonymously(auth) {
249
249
  * @returns {Promise<UserCredential>}
250
250
  */
251
251
  export async function signInWithCredential(auth, credential) {
252
- return auth.signInWithCredential(credential);
252
+ return auth.signInWithCredential.call(auth, credential, MODULAR_DEPRECATION_ARG);
253
253
  }
254
254
 
255
255
  /**
@@ -259,7 +259,7 @@ export async function signInWithCredential(auth, credential) {
259
259
  * @returns {Promise<UserCredential>}
260
260
  */
261
261
  export async function signInWithCustomToken(auth, customToken) {
262
- return auth.signInWithCustomToken(customToken);
262
+ return auth.signInWithCustomToken.call(auth, customToken, MODULAR_DEPRECATION_ARG);
263
263
  }
264
264
 
265
265
  /**
@@ -270,7 +270,7 @@ export async function signInWithCustomToken(auth, customToken) {
270
270
  * @returns {Promise<UserCredential>}
271
271
  */
272
272
  export async function signInWithEmailAndPassword(auth, email, password) {
273
- return auth.signInWithEmailAndPassword(email, password);
273
+ return auth.signInWithEmailAndPassword.call(auth, email, password, MODULAR_DEPRECATION_ARG);
274
274
  }
275
275
 
276
276
  /**
@@ -281,7 +281,7 @@ export async function signInWithEmailAndPassword(auth, email, password) {
281
281
  * @returns {Promise<UserCredential>}
282
282
  */
283
283
  export async function signInWithEmailLink(auth, email, emailLink) {
284
- return auth.signInWithEmailLink(email, emailLink);
284
+ return auth.signInWithEmailLink.call(auth, email, emailLink, MODULAR_DEPRECATION_ARG);
285
285
  }
286
286
 
287
287
  /**
@@ -292,7 +292,7 @@ export async function signInWithEmailLink(auth, email, emailLink) {
292
292
  * @returns {Promise<ConfirmationResult>}
293
293
  */
294
294
  export async function signInWithPhoneNumber(auth, phoneNumber, appVerifier) {
295
- return auth.signInWithPhoneNumber(phoneNumber, appVerifier);
295
+ return auth.signInWithPhoneNumber.call(auth, phoneNumber, appVerifier, MODULAR_DEPRECATION_ARG);
296
296
  }
297
297
 
298
298
  /**
@@ -304,7 +304,13 @@ export async function signInWithPhoneNumber(auth, phoneNumber, appVerifier) {
304
304
  * @returns {PhoneAuthListener}
305
305
  */
306
306
  export function verifyPhoneNumber(auth, phoneNumber, autoVerifyTimeoutOrForceResend, forceResend) {
307
- return auth.verifyPhoneNumber(phoneNumber, autoVerifyTimeoutOrForceResend, forceResend);
307
+ return auth.verifyPhoneNumber.call(
308
+ auth,
309
+ phoneNumber,
310
+ autoVerifyTimeoutOrForceResend,
311
+ forceResend,
312
+ MODULAR_DEPRECATION_ARG,
313
+ );
308
314
  }
309
315
 
310
316
  /**
@@ -315,7 +321,7 @@ export function verifyPhoneNumber(auth, phoneNumber, autoVerifyTimeoutOrForceRes
315
321
  * @returns {Promise<UserCredential>}
316
322
  */
317
323
  export async function signInWithPopup(auth, provider, resolver) {
318
- return auth.signInWithPopup(provider, resolver);
324
+ return auth.signInWithPopup.call(auth, provider, resolver, MODULAR_DEPRECATION_ARG);
319
325
  }
320
326
 
321
327
  /**
@@ -326,7 +332,7 @@ export async function signInWithPopup(auth, provider, resolver) {
326
332
  * @returns {Promise<void>}
327
333
  */
328
334
  export async function signInWithRedirect(auth, provider, resolver) {
329
- return auth.signInWithRedirect(provider, resolver);
335
+ return auth.signInWithRedirect.call(auth, provider, resolver, MODULAR_DEPRECATION_ARG);
330
336
  }
331
337
 
332
338
  /**
@@ -335,7 +341,7 @@ export async function signInWithRedirect(auth, provider, resolver) {
335
341
  * @returns {Promise<void>}
336
342
  */
337
343
  export async function signOut(auth) {
338
- return auth.signOut();
344
+ return auth.signOut.call(auth, MODULAR_DEPRECATION_ARG);
339
345
  }
340
346
 
341
347
  /**
@@ -357,13 +363,22 @@ export function useDeviceLanguage(auth) {
357
363
  }
358
364
 
359
365
  /**
360
- * Sets the current language to the default device/browser preference.
366
+ * Sets the language code.
367
+ * @param {Auth} auth - The Auth instance.
368
+ * @param {string} languageCode - The language code.
369
+ */
370
+ export function setLanguageCode(auth, languageCode) {
371
+ return auth.setLanguageCode.call(auth, languageCode, MODULAR_DEPRECATION_ARG);
372
+ }
373
+
374
+ /**
375
+ * Configures a shared user access group to sync auth state across multiple apps via the Keychain.
361
376
  * @param {Auth} auth - The Auth instance.
362
377
  * @param {string} userAccessGroup - The user access group.
363
378
  * @returns {Promise<void>}
364
379
  */
365
380
  export function useUserAccessGroup(auth, userAccessGroup) {
366
- return auth.useUserAccessGroup(userAccessGroup);
381
+ return auth.useUserAccessGroup.call(auth, userAccessGroup, MODULAR_DEPRECATION_ARG);
367
382
  }
368
383
 
369
384
  /**
@@ -373,7 +388,7 @@ export function useUserAccessGroup(auth, userAccessGroup) {
373
388
  * @returns {Promise<string>}
374
389
  */
375
390
  export async function verifyPasswordResetCode(auth, code) {
376
- return auth.verifyPasswordResetCode(code);
391
+ return auth.verifyPasswordResetCode.call(auth, code, MODULAR_DEPRECATION_ARG);
377
392
  }
378
393
 
379
394
  /**
@@ -391,7 +406,7 @@ export function parseActionCodeURL(link) {
391
406
  * @returns {Promise<void>}
392
407
  */
393
408
  export async function deleteUser(user) {
394
- return user.delete();
409
+ return user.delete.call(user, MODULAR_DEPRECATION_ARG);
395
410
  }
396
411
 
397
412
  /**
@@ -401,7 +416,7 @@ export async function deleteUser(user) {
401
416
  * @returns {Promise<string>}
402
417
  */
403
418
  export async function getIdToken(user, forceRefresh) {
404
- return user.getIdToken(forceRefresh);
419
+ return user.getIdToken.call(user, forceRefresh, MODULAR_DEPRECATION_ARG);
405
420
  }
406
421
 
407
422
  /**
@@ -411,7 +426,7 @@ export async function getIdToken(user, forceRefresh) {
411
426
  * @returns {Promise<IdTokenResult>}
412
427
  */
413
428
  export async function getIdTokenResult(user, forceRefresh) {
414
- return user.getIdTokenResult(forceRefresh);
429
+ return user.getIdTokenResult.call(user, forceRefresh, MODULAR_DEPRECATION_ARG);
415
430
  }
416
431
 
417
432
  /**
@@ -421,7 +436,7 @@ export async function getIdTokenResult(user, forceRefresh) {
421
436
  * @returns {Promise<UserCredential>}
422
437
  */
423
438
  export async function linkWithCredential(user, credential) {
424
- return user.linkWithCredential(credential);
439
+ return user.linkWithCredential.call(user, credential, MODULAR_DEPRECATION_ARG);
425
440
  }
426
441
 
427
442
  /**
@@ -443,7 +458,7 @@ export async function linkWithPhoneNumber(user, phoneNumber, appVerifier) {
443
458
  * @returns {Promise<UserCredential>}
444
459
  */
445
460
  export async function linkWithPopup(user, provider, resolver) {
446
- return user.linkWithPopup(provider, resolver);
461
+ return user.linkWithPopup.call(user, provider, resolver, MODULAR_DEPRECATION_ARG);
447
462
  }
448
463
 
449
464
  /**
@@ -454,7 +469,7 @@ export async function linkWithPopup(user, provider, resolver) {
454
469
  * @returns {Promise<void>}
455
470
  */
456
471
  export async function linkWithRedirect(user, provider, resolver) {
457
- return user.linkWithRedirect(provider, resolver);
472
+ return user.linkWithRedirect.call(user, provider, resolver, MODULAR_DEPRECATION_ARG);
458
473
  }
459
474
 
460
475
  /**
@@ -473,7 +488,7 @@ export function multiFactor(user) {
473
488
  * @returns {Promise<UserCredential>}
474
489
  */
475
490
  export async function reauthenticateWithCredential(user, credential) {
476
- return user.reauthenticateWithCredential(credential);
491
+ return user.reauthenticateWithCredential.call(user, credential, MODULAR_DEPRECATION_ARG);
477
492
  }
478
493
 
479
494
  /**
@@ -495,7 +510,7 @@ export async function reauthenticateWithPhoneNumber(user, phoneNumber, appVerifi
495
510
  * @returns {Promise<UserCredential>}
496
511
  */
497
512
  export async function reauthenticateWithPopup(user, provider, resolver) {
498
- return user.reauthenticateWithPopup(provider, resolver);
513
+ return user.reauthenticateWithPopup.call(user, provider, resolver, MODULAR_DEPRECATION_ARG);
499
514
  }
500
515
 
501
516
  /**
@@ -506,7 +521,7 @@ export async function reauthenticateWithPopup(user, provider, resolver) {
506
521
  * @returns {Promise<UserCredential>}
507
522
  */
508
523
  export async function reauthenticateWithRedirect(user, provider, resolver) {
509
- return user.reauthenticateWithRedirect(provider, resolver);
524
+ return user.reauthenticateWithRedirect.call(user, provider, resolver, MODULAR_DEPRECATION_ARG);
510
525
  }
511
526
 
512
527
  /**
@@ -515,7 +530,7 @@ export async function reauthenticateWithRedirect(user, provider, resolver) {
515
530
  * @returns {Promise<void>}
516
531
  */
517
532
  export async function reload(user) {
518
- return user.reload();
533
+ return user.reload.call(user, MODULAR_DEPRECATION_ARG);
519
534
  }
520
535
 
521
536
  /**
@@ -525,7 +540,7 @@ export async function reload(user) {
525
540
  * @returns {Promise<void>}
526
541
  */
527
542
  export async function sendEmailVerification(user, actionCodeSettings) {
528
- return user.sendEmailVerification(actionCodeSettings);
543
+ return user.sendEmailVerification.call(user, actionCodeSettings, MODULAR_DEPRECATION_ARG);
529
544
  }
530
545
 
531
546
  /**
@@ -535,7 +550,7 @@ export async function sendEmailVerification(user, actionCodeSettings) {
535
550
  * @returns {Promise<User>}
536
551
  */
537
552
  export async function unlink(user, providerId) {
538
- return user.unlink(providerId);
553
+ return user.unlink.call(user, providerId, MODULAR_DEPRECATION_ARG);
539
554
  }
540
555
 
541
556
  /**
@@ -545,7 +560,7 @@ export async function unlink(user, providerId) {
545
560
  * @returns {Promise<void>}
546
561
  */
547
562
  export async function updateEmail(user, newEmail) {
548
- return user.updateEmail(newEmail);
563
+ return user.updateEmail.call(user, newEmail, MODULAR_DEPRECATION_ARG);
549
564
  }
550
565
 
551
566
  /**
@@ -555,7 +570,7 @@ export async function updateEmail(user, newEmail) {
555
570
  * @returns {Promise<void>}
556
571
  */
557
572
  export async function updatePassword(user, newPassword) {
558
- return user.updatePassword(newPassword);
573
+ return user.updatePassword.call(user, newPassword, MODULAR_DEPRECATION_ARG);
559
574
  }
560
575
 
561
576
  /**
@@ -565,7 +580,7 @@ export async function updatePassword(user, newPassword) {
565
580
  * @returns {Promise<void>}
566
581
  */
567
582
  export async function updatePhoneNumber(user, credential) {
568
- return user.updatePhoneNumber(credential);
583
+ return user.updatePhoneNumber.call(user, credential, MODULAR_DEPRECATION_ARG);
569
584
  }
570
585
 
571
586
  /**
@@ -575,7 +590,11 @@ export async function updatePhoneNumber(user, credential) {
575
590
  * @returns {Promise<void>}
576
591
  */
577
592
  export async function updateProfile(user, { displayName, photoURL: photoUrl }) {
578
- return user.updateProfile({ displayName, photoURL: photoUrl });
593
+ return user.updateProfile.call(
594
+ user,
595
+ { displayName, photoURL: photoUrl },
596
+ MODULAR_DEPRECATION_ARG,
597
+ );
579
598
  }
580
599
 
581
600
  /**
@@ -586,7 +605,12 @@ export async function updateProfile(user, { displayName, photoURL: photoUrl }) {
586
605
  * @returns {Promise<void>}
587
606
  */
588
607
  export async function verifyBeforeUpdateEmail(user, newEmail, actionCodeSettings) {
589
- return user.verifyBeforeUpdateEmail(newEmail, actionCodeSettings);
608
+ return user.verifyBeforeUpdateEmail.call(
609
+ user,
610
+ newEmail,
611
+ actionCodeSettings,
612
+ MODULAR_DEPRECATION_ARG,
613
+ );
590
614
  }
591
615
 
592
616
  /**
@@ -604,7 +628,7 @@ export function getAdditionalUserInfo(userCredential) {
604
628
  * @returns {Promise<string>}
605
629
  */
606
630
  export function getCustomAuthDomain(auth) {
607
- return auth.getCustomAuthDomain();
631
+ return auth.getCustomAuthDomain.call(auth, MODULAR_DEPRECATION_ARG);
608
632
  }
609
633
 
610
634
  /**
@@ -1,9 +1,8 @@
1
+ import { reload } from './modular';
1
2
  /**
2
3
  * Return a MultiFactorUser instance the gateway to multi-factor operations.
3
4
  */
4
5
  export function multiFactor(auth) {
5
- // eslint-disable-next-line no-console
6
- console.warn('This method is deprecated. Please use auth().multiFactor(user) instead');
7
6
  return new MultiFactorUser(auth);
8
7
  }
9
8
 
@@ -33,7 +32,7 @@ export class MultiFactorUser {
33
32
  await this._auth.native.finalizeMultiFactorEnrollment(token, secret, displayName);
34
33
 
35
34
  // We need to reload the user otherwise the changes are not visible
36
- return this._auth.currentUser.reload();
35
+ return reload(this._auth.currentUser);
37
36
  }
38
37
 
39
38
  unenroll() {
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '22.2.0';
2
+ module.exports = '22.3.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/auth",
3
- "version": "22.2.0",
3
+ "version": "22.3.0",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Firebase - The authentication module provides an easy-to-use API to integrate an authentication workflow into new and existing applications. React Native Firebase provides access to all Firebase authentication methods and identity providers.",
6
6
  "main": "lib/index.js",
@@ -27,7 +27,7 @@
27
27
  "plist": "^3.1.0"
28
28
  },
29
29
  "peerDependencies": {
30
- "@react-native-firebase/app": "22.2.0",
30
+ "@react-native-firebase/app": "22.3.0",
31
31
  "expo": ">=47.0.0"
32
32
  },
33
33
  "devDependencies": {
@@ -43,5 +43,5 @@
43
43
  "access": "public",
44
44
  "provenance": true
45
45
  },
46
- "gitHead": "b302210509ceac8078b5fb9fd0b24e68f0641c6a"
46
+ "gitHead": "c04f2a3b681460edde5518812646cf5e0dd86627"
47
47
  }
@@ -79,7 +79,7 @@ function modifyAppDelegate(contents, language) {
79
79
  }
80
80
  }
81
81
  const skipOpenUrlForFirebaseAuthBlock = `\
82
- if ([url.host caseInsensitiveCompare:@"firebaseauth"] == NSOrderedSame) {
82
+ if (url.host && [url.host caseInsensitiveCompare:@"firebaseauth"] == NSOrderedSame) {
83
83
  // invocations for Firebase Auth are handled elsewhere and should not be forwarded to Expo Router
84
84
  return NO;
85
85
  }\
@@ -101,7 +101,7 @@ export function modifyAppDelegate(contents: string, language: string): string |
101
101
  }
102
102
 
103
103
  const skipOpenUrlForFirebaseAuthBlock: string = `\
104
- if ([url.host caseInsensitiveCompare:@"firebaseauth"] == NSOrderedSame) {
104
+ if (url.host && [url.host caseInsensitiveCompare:@"firebaseauth"] == NSOrderedSame) {
105
105
  // invocations for Firebase Auth are handled elsewhere and should not be forwarded to Expo Router
106
106
  return NO;
107
107
  }\