@react-native-firebase/auth 17.5.0 → 18.1.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,25 @@
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
+ ## [18.1.0](https://github.com/invertase/react-native-firebase/compare/v18.0.0...v18.1.0) (2023-06-22)
7
+
8
+ **Note:** Version bump only for package @react-native-firebase/auth
9
+
10
+ ## [18.0.0](https://github.com/invertase/react-native-firebase/compare/v17.5.0...v18.0.0) (2023-06-05)
11
+
12
+ ### ⚠ BREAKING CHANGES
13
+
14
+ - **app, sdks:** firebase-ios-sdk 10.8.0 and higher require Xcode 13.3+,
15
+ which transitively requires macOS 12.0+. You must update your CI build environments
16
+ to meet these minimums as well as your development environments - if you have older
17
+ hardware that still works but cannot be upgraded normally, you may like:
18
+ https://dortania.github.io/OpenCore-Legacy-Patcher/
19
+
20
+ ### Features
21
+
22
+ - **app, sdks:** ios-sdk 10.8.0 requires Xcode 13.3+; android-sdk 31.5.0 ([86dc4d5](https://github.com/invertase/react-native-firebase/commit/86dc4d5d08a4cc7c788b057b5411ccdeb413e13e))
23
+ - **auth, android:** add forceRecaptchaFlowForTesting API ([#7148](https://github.com/invertase/react-native-firebase/issues/7148)) ([95d014c](https://github.com/invertase/react-native-firebase/commit/95d014cd6b8cc5715c585fee34715587a6694057))
24
+
6
25
  ## [17.5.0](https://github.com/invertase/react-native-firebase/compare/v17.4.3...v17.5.0) (2023-05-11)
7
26
 
8
27
  **Note:** Version bump only for package @react-native-firebase/auth
@@ -246,6 +246,29 @@ class ReactNativeFirebaseAuthModule extends ReactNativeFirebaseModule {
246
246
  }
247
247
  }
248
248
 
249
+ /**
250
+ * Forces application verification to use the web reCAPTCHA flow for Phone Authentication.
251
+ *
252
+ * <p>Once this has been called, every call to PhoneAuthProvider#verifyPhoneNumber() will skip the
253
+ * Play Integrity API verification flow and use the reCAPTCHA flow instead.
254
+ *
255
+ * <p>Calling this method a second time will overwrite the previously passed parameter.
256
+ *
257
+ * @param appName
258
+ * @param forceRecaptchaFlow
259
+ * @param promise
260
+ */
261
+ @ReactMethod
262
+ public void forceRecaptchaFlowForTesting(
263
+ String appName, boolean forceRecaptchaFlow, Promise promise) {
264
+ Log.d(TAG, "forceRecaptchaFlowForTesting");
265
+ FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
266
+ FirebaseAuth firebaseAuth = FirebaseAuth.getInstance(firebaseApp);
267
+ FirebaseAuthSettings firebaseAuthSettings = firebaseAuth.getFirebaseAuthSettings();
268
+ firebaseAuthSettings.forceRecaptchaFlowForTesting(forceRecaptchaFlow);
269
+ promise.resolve(null);
270
+ }
271
+
249
272
  /**
250
273
  * The phone number and SMS code here must have been configured in the Firebase Console
251
274
  * (Authentication > Sign In Method > Phone).
package/lib/Settings.js CHANGED
@@ -20,9 +20,21 @@ import { isAndroid } from '@react-native-firebase/app/lib/common';
20
20
  export default class Settings {
21
21
  constructor(auth) {
22
22
  this._auth = auth;
23
+ this._forceRecaptchaFlowForTesting = false;
23
24
  this._appVerificationDisabledForTesting = false;
24
25
  }
25
26
 
27
+ get forceRecaptchaFlowForTesting() {
28
+ return this._forceRecaptchaFlowForTesting;
29
+ }
30
+
31
+ set forceRecaptchaFlowForTesting(forceRecaptchaFlow) {
32
+ if (isAndroid) {
33
+ this._forceRecaptchaFlowForTesting = forceRecaptchaFlow;
34
+ this._auth.native.forceRecaptchaFlowForTesting(forceRecaptchaFlow);
35
+ }
36
+ }
37
+
26
38
  get appVerificationDisabledForTesting() {
27
39
  return this._appVerificationDisabledForTesting;
28
40
  }
package/lib/index.d.ts CHANGED
@@ -1020,6 +1020,20 @@ export namespace FirebaseAuthTypes {
1020
1020
  * ```
1021
1021
  */
1022
1022
  export interface AuthSettings {
1023
+ /**
1024
+ * Forces application verification to use the web reCAPTCHA flow for Phone Authentication.
1025
+ *
1026
+ * Once this has been called, every call to PhoneAuthProvider#verifyPhoneNumber() will skip the Play Integrity API verification flow and use the reCAPTCHA flow instead.
1027
+ *
1028
+ * <p>Calling this method a second time will overwrite the previously passed parameter.
1029
+ *
1030
+ * @android
1031
+ * @param appName
1032
+ * @param forceRecaptchaFlow
1033
+ * @param promise
1034
+ */
1035
+ forceRecaptchaFlowForTesting: boolean;
1036
+
1023
1037
  /**
1024
1038
  * Flag to disable app verification for the purpose of testing phone authentication. For this property to take effect, it needs to be set before rendering a reCAPTCHA app verifier. When this is disabled, a mock reCAPTCHA is rendered instead. This is useful for manual testing during development or for automated integration tests.
1025
1039
  *
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '17.5.0';
2
+ module.exports = '18.1.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/auth",
3
- "version": "17.5.0",
3
+ "version": "18.1.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.0.5"
28
28
  },
29
29
  "peerDependencies": {
30
- "@react-native-firebase/app": "17.5.0",
30
+ "@react-native-firebase/app": "18.1.0",
31
31
  "expo": ">=47.0.0"
32
32
  },
33
33
  "devDependencies": {
@@ -42,5 +42,5 @@
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  },
45
- "gitHead": "a58ea4bfd72c903d43844da30d4f3bf5feb0f057"
45
+ "gitHead": "1c2dd42a9a2207a25e326be866ccc15f4d7b9c21"
46
46
  }