@react-native-firebase/auth 22.4.0 → 23.0.1

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,29 @@
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
+ ## [23.0.1](https://github.com/invertase/react-native-firebase/compare/v23.0.0...v23.0.1) (2025-08-12)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **auth, ios:** filter out non-phone multifactor to avoid crash ([#8645](https://github.com/invertase/react-native-firebase/issues/8645)) ([90b6d98](https://github.com/invertase/react-native-firebase/commit/90b6d988d0c0ca216cbdd47e7900aa0b629bdc43))
11
+
12
+ ## [23.0.0](https://github.com/invertase/react-native-firebase/compare/v22.4.0...v23.0.0) (2025-08-07)
13
+
14
+ ### ⚠ BREAKING CHANGES
15
+
16
+ - android minSdk now must be 23+ (was 21)
17
+ - remove deprecated API from auth & crashlytics (#8636)
18
+ - **dynamic-links:** remove Dynamic Links from React Native Firebase (#8631)
19
+
20
+ ### Features
21
+
22
+ - bump Firebase android SDK to `34.0.0` ([#8627](https://github.com/invertase/react-native-firebase/issues/8627)) ([e9ef5ec](https://github.com/invertase/react-native-firebase/commit/e9ef5ec9742f28ec1d621a401f82125acff0f1cf))
23
+
24
+ ### Bug Fixes
25
+
26
+ - **dynamic-links:** remove Dynamic Links from React Native Firebase ([#8631](https://github.com/invertase/react-native-firebase/issues/8631)) ([fe4550f](https://github.com/invertase/react-native-firebase/commit/fe4550f362548dcb66359044715e22222a413f97))
27
+ - remove deprecated API from auth & crashlytics ([#8636](https://github.com/invertase/react-native-firebase/issues/8636)) ([213b939](https://github.com/invertase/react-native-firebase/commit/213b939b552e0f84fbccb136a03f23e9b5c8ade8))
28
+
6
29
  ## [22.4.0](https://github.com/invertase/react-native-firebase/compare/v22.3.0...v22.4.0) (2025-07-10)
7
30
 
8
31
  **Note:** Version bump only for package @react-native-firebase/auth
@@ -47,7 +47,7 @@ project.ext {
47
47
  set('react-native', [
48
48
  versions: [
49
49
  android : [
50
- minSdk : 23, // jsonMinSdk, this is temporarily higher than other modules
50
+ minSdk : jsonMinSdk,
51
51
  targetSdk : jsonTargetSdk,
52
52
  compileSdk: jsonCompileSdk,
53
53
  ],
@@ -2591,10 +2591,6 @@ class ReactNativeFirebaseAuthModule extends ReactNativeFirebaseModule {
2591
2591
  builder = builder.setHandleCodeInApp(actionCodeSettings.getBoolean("handleCodeInApp"));
2592
2592
  }
2593
2593
 
2594
- if (actionCodeSettings.hasKey("dynamicLinkDomain")) {
2595
- builder = builder.setDynamicLinkDomain(actionCodeSettings.getString("dynamicLinkDomain"));
2596
- }
2597
-
2598
2594
  if (actionCodeSettings.hasKey("linkDomain")) {
2599
2595
  builder =
2600
2596
  builder.setLinkDomain(Objects.requireNonNull(actionCodeSettings.getString("linkDomain")));
@@ -45,7 +45,6 @@ static NSString *const constAppLanguage = @"APP_LANGUAGE";
45
45
  static NSString *const constAppUser = @"APP_USER";
46
46
  static NSString *const keyHandleCodeInApp = @"handleCodeInApp";
47
47
  static NSString *const keyLinkDomain = @"linkDomain";
48
- static NSString *const keyDynamicLinkDomain = @"dynamicLinkDomain";
49
48
  static NSString *const keyAdditionalUserInfo = @"additionalUserInfo";
50
49
  static NSString *const AUTH_STATE_CHANGED_EVENT = @"auth_state_changed";
51
50
  static NSString *const AUTH_ID_TOKEN_CHANGED_EVENT = @"auth_id_token_changed";
@@ -1463,15 +1462,6 @@ RCT_EXPORT_METHOD(useEmulator
1463
1462
  }
1464
1463
  #endif
1465
1464
 
1466
- - (NSString *)getJSFactorId:(NSString *)factorId {
1467
- if ([factorId isEqualToString:@"1"]) {
1468
- // Only phone is supported by the front-end so far
1469
- return @"phone";
1470
- }
1471
-
1472
- return factorId;
1473
- }
1474
-
1475
1465
  - (void)promiseRejectAuthException:(RCTPromiseRejectBlock)reject error:(NSError *)error {
1476
1466
  NSDictionary *jsError = [self getJSError:error];
1477
1467
 
@@ -1738,19 +1728,25 @@ RCT_EXPORT_METHOD(useEmulator
1738
1728
  - (NSArray<NSMutableDictionary *> *)convertMultiFactorData:(NSArray<FIRMultiFactorInfo *> *)hints {
1739
1729
  NSMutableArray *enrolledFactors = [NSMutableArray array];
1740
1730
 
1741
- for (FIRPhoneMultiFactorInfo *hint in hints) {
1731
+ for (FIRMultiFactorInfo *hint in hints) {
1742
1732
  NSString *enrollmentTime =
1743
1733
  [[[NSISO8601DateFormatter alloc] init] stringFromDate:hint.enrollmentDate];
1744
- [enrolledFactors addObject:@{
1734
+
1735
+ NSMutableDictionary *factorDict = [@{
1745
1736
  @"uid" : hint.UID,
1746
- @"factorId" : [self getJSFactorId:(hint.factorID)],
1737
+ @"factorId" : hint.factorID,
1747
1738
  @"displayName" : hint.displayName == nil ? [NSNull null] : hint.displayName,
1748
1739
  @"enrollmentTime" : enrollmentTime,
1749
1740
  // @deprecated enrollmentDate kept for backwards compatibility, please use enrollmentTime
1750
1741
  @"enrollmentDate" : enrollmentTime,
1751
- // phoneNumber only present on FIRPhoneMultiFactorInfo
1752
- @"phoneNumber" : hint.phoneNumber == nil ? [NSNull null] : hint.phoneNumber,
1753
- }];
1742
+ } mutableCopy];
1743
+
1744
+ // only support phone mutli factor
1745
+ if ([hint isKindOfClass:[FIRPhoneMultiFactorInfo class]]) {
1746
+ FIRPhoneMultiFactorInfo *phoneHint = (FIRPhoneMultiFactorInfo *)hint;
1747
+ factorDict[@"phoneNumber"] = phoneHint.phoneNumber;
1748
+ [enrolledFactors addObject:factorDict];
1749
+ }
1754
1750
  }
1755
1751
  return enrolledFactors;
1756
1752
  }
@@ -1785,11 +1781,6 @@ RCT_EXPORT_METHOD(useEmulator
1785
1781
  [settings setHandleCodeInApp:handleCodeInApp];
1786
1782
  }
1787
1783
 
1788
- if (actionCodeSettings[keyDynamicLinkDomain]) {
1789
- NSString *dynamicLinkDomain = actionCodeSettings[keyDynamicLinkDomain];
1790
- [settings setDynamicLinkDomain:dynamicLinkDomain];
1791
- }
1792
-
1793
1784
  if (actionCodeSettings[keyAndroid]) {
1794
1785
  NSDictionary *android = actionCodeSettings[keyAndroid];
1795
1786
  NSString *packageName = android[keyPackageName];
package/lib/User.js CHANGED
@@ -16,7 +16,6 @@
16
16
  */
17
17
 
18
18
  import { isObject, isString, isUndefined, isBoolean } from '@react-native-firebase/app/lib/common';
19
- import { warnDynamicLink } from './utils';
20
19
 
21
20
  export default class User {
22
21
  constructor(auth, user) {
@@ -132,7 +131,6 @@ export default class User {
132
131
  }
133
132
 
134
133
  sendEmailVerification(actionCodeSettings) {
135
- warnDynamicLink(actionCodeSettings);
136
134
  if (isObject(actionCodeSettings)) {
137
135
  if (!isString(actionCodeSettings.url)) {
138
136
  throw new Error(
@@ -140,15 +138,6 @@ export default class User {
140
138
  );
141
139
  }
142
140
 
143
- if (
144
- !isUndefined(actionCodeSettings.dynamicLinkDomain) &&
145
- !isString(actionCodeSettings.dynamicLinkDomain)
146
- ) {
147
- throw new Error(
148
- "firebase.auth.User.sendEmailVerification(*) 'actionCodeSettings.dynamicLinkDomain' expected a string value.",
149
- );
150
- }
151
-
152
141
  if (!isUndefined(actionCodeSettings.linkDomain) && !isString(actionCodeSettings.linkDomain)) {
153
142
  throw new Error(
154
143
  "firebase.auth.User.sendEmailVerification(*) 'actionCodeSettings.linkDomain' expected a string value.",
@@ -249,7 +238,6 @@ export default class User {
249
238
  }
250
239
 
251
240
  verifyBeforeUpdateEmail(newEmail, actionCodeSettings) {
252
- warnDynamicLink(actionCodeSettings);
253
241
  if (!isString(newEmail)) {
254
242
  throw new Error(
255
243
  "firebase.auth.User.verifyBeforeUpdateEmail(*) 'newEmail' expected a string value.",
@@ -263,15 +251,6 @@ export default class User {
263
251
  );
264
252
  }
265
253
 
266
- if (
267
- !isUndefined(actionCodeSettings.dynamicLinkDomain) &&
268
- !isString(actionCodeSettings.dynamicLinkDomain)
269
- ) {
270
- throw new Error(
271
- "firebase.auth.User.verifyBeforeUpdateEmail(_, *) 'actionCodeSettings.dynamicLinkDomain' expected a string value.",
272
- );
273
- }
274
-
275
254
  if (!isUndefined(actionCodeSettings.linkDomain) && !isString(actionCodeSettings.linkDomain)) {
276
255
  throw new Error(
277
256
  "firebase.auth.User.verifyBeforeUpdateEmail(_, *) 'actionCodeSettings.linkDomain' expected a string value.",
package/lib/index.js CHANGED
@@ -47,7 +47,6 @@ import PhoneAuthProvider from './providers/PhoneAuthProvider';
47
47
  import TwitterAuthProvider from './providers/TwitterAuthProvider';
48
48
  import version from './version';
49
49
  import fallBackModule from './web/RNFBAuthModule';
50
- import { warnDynamicLink } from './utils';
51
50
 
52
51
  const PhoneAuthState = {
53
52
  CODE_SENT: 'sent',
@@ -355,12 +354,10 @@ class FirebaseAuthModule extends FirebaseModule {
355
354
  }
356
355
 
357
356
  sendPasswordResetEmail(email, actionCodeSettings = null) {
358
- warnDynamicLink(actionCodeSettings);
359
357
  return this.native.sendPasswordResetEmail(email, actionCodeSettings);
360
358
  }
361
359
 
362
360
  sendSignInLinkToEmail(email, actionCodeSettings = {}) {
363
- warnDynamicLink(actionCodeSettings);
364
361
  return this.native.sendSignInLinkToEmail(email, actionCodeSettings);
365
362
  }
366
363
 
@@ -14,8 +14,6 @@ export class MultiFactorUser {
14
14
  }
15
15
  this._user = user;
16
16
  this.enrolledFactors = user.multiFactor.enrolledFactors;
17
- // @deprecated kept for backwards compatibility, please use enrolledFactors
18
- this.enrolledFactor = user.multiFactor.enrolledFactors;
19
17
  }
20
18
 
21
19
  getSession() {
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '22.4.0';
2
+ module.exports = '23.0.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/auth",
3
- "version": "22.4.0",
3
+ "version": "23.0.1",
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.4.0",
30
+ "@react-native-firebase/app": "23.0.1",
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": "7eaaf185aab15c7e4fc3c218af9be609fe7e0030"
46
+ "gitHead": "bad0f509650c81b7a2961a90a5501d3b9696f1d0"
47
47
  }
package/lib/utils.js DELETED
@@ -1,9 +0,0 @@
1
- export function warnDynamicLink(actionCodeSettings) {
2
- if (actionCodeSettings && actionCodeSettings.dynamicLinkDomain) {
3
- // eslint-disable-next-line no-console
4
- console.warn(
5
- 'Firebase Dynamic Links is deprecated and will be shut down as early as August * 2025. \
6
- Instead, use ActionCodeSettings.linkDomain to set up a custom domain. Learn more at: https://firebase.google.com/support/dynamic-links-faq',
7
- );
8
- }
9
- }