@react-native-firebase/app-check 14.3.0 → 14.4.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 +19 -0
- package/ios/RNFBAppCheck/RNFBAppCheckModule.m +4 -1
- package/lib/index.js +20 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
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
|
+
# [14.4.0](https://github.com/invertase/react-native-firebase/compare/v14.3.3...v14.4.0) (2022-02-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @react-native-firebase/app-check
|
|
9
|
+
|
|
10
|
+
## [14.3.3](https://github.com/invertase/react-native-firebase/compare/v14.3.2...v14.3.3) (2022-02-12)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @react-native-firebase/app-check
|
|
13
|
+
|
|
14
|
+
## [14.3.2](https://github.com/invertase/react-native-firebase/compare/v14.3.1...v14.3.2) (2022-02-10)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @react-native-firebase/app-check
|
|
17
|
+
|
|
18
|
+
## [14.3.1](https://github.com/invertase/react-native-firebase/compare/v14.3.0...v14.3.1) (2022-02-07)
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- **app-check, activate:** correctly check activate parameters ([a583494](https://github.com/invertase/react-native-firebase/commit/a583494d645fe74b043b0dedcf5f2e334e020edf)), closes [#5981](https://github.com/invertase/react-native-firebase/issues/5981)
|
|
23
|
+
- **app-check, activate:** return Promise(void) on ios not void ([0f23441](https://github.com/invertase/react-native-firebase/commit/0f234413542907cd29fb72ccaf6138ff15844443)), closes [#6052](https://github.com/invertase/react-native-firebase/issues/6052)
|
|
24
|
+
|
|
6
25
|
# [14.3.0](https://github.com/invertase/react-native-firebase/compare/v14.2.4...v14.3.0) (2022-01-26)
|
|
7
26
|
|
|
8
27
|
### Features
|
|
@@ -39,7 +39,9 @@ RCT_EXPORT_MODULE();
|
|
|
39
39
|
RCT_EXPORT_METHOD(activate
|
|
40
40
|
: (FIRApp *)firebaseApp
|
|
41
41
|
: (nonnull NSString *)siteKeyOrProvider
|
|
42
|
-
: (BOOL)isTokenAutoRefreshEnabled
|
|
42
|
+
: (BOOL)isTokenAutoRefreshEnabled
|
|
43
|
+
: (RCTPromiseResolveBlock)resolve rejecter
|
|
44
|
+
: (RCTPromiseRejectBlock)reject) {
|
|
43
45
|
// From SDK docs:
|
|
44
46
|
// NOTE: Make sure to call this method before FirebaseApp.configure().
|
|
45
47
|
// If this method is called after configuring Firebase, the changes will not take effect.
|
|
@@ -49,6 +51,7 @@ RCT_EXPORT_METHOD(activate
|
|
|
49
51
|
|
|
50
52
|
FIRAppCheck *appCheck = [FIRAppCheck appCheckWithApp:firebaseApp];
|
|
51
53
|
appCheck.isTokenAutoRefreshEnabled = isTokenAutoRefreshEnabled;
|
|
54
|
+
resolve([NSNull null]);
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
RCT_EXPORT_METHOD(setTokenAutoRefreshEnabled
|
package/lib/index.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { isIOS } from '@react-native-firebase/app/lib/common';
|
|
18
|
+
import { isBoolean, isIOS, isString } from '@react-native-firebase/app/lib/common';
|
|
19
19
|
import {
|
|
20
20
|
createModuleNamespace,
|
|
21
21
|
FirebaseModule,
|
|
@@ -32,6 +32,25 @@ const nativeModuleName = 'RNFBAppCheckModule';
|
|
|
32
32
|
|
|
33
33
|
class FirebaseAppCheckModule extends FirebaseModule {
|
|
34
34
|
activate(siteKeyOrProvider, isTokenAutoRefreshEnabled) {
|
|
35
|
+
if (!isString(siteKeyOrProvider)) {
|
|
36
|
+
throw new Error('siteKeyOrProvider must be a string value to match firebase-js-sdk API');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// If the caller did not specify token refresh, attempt to use app-check specific setting:
|
|
40
|
+
if (!isBoolean(isTokenAutoRefreshEnabled)) {
|
|
41
|
+
isTokenAutoRefreshEnabled = this.firebaseJson.app_check_token_auto_refresh;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// If that was not defined, attempt to use app-wide data collection setting per docs:
|
|
45
|
+
if (!isBoolean(isTokenAutoRefreshEnabled)) {
|
|
46
|
+
isTokenAutoRefreshEnabled = this.firebaseJson.app_data_collection_default_enabled;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// If that also was not defined, the default is documented as true.
|
|
50
|
+
if (!isBoolean(isTokenAutoRefreshEnabled)) {
|
|
51
|
+
isTokenAutoRefreshEnabled = true;
|
|
52
|
+
}
|
|
53
|
+
|
|
35
54
|
return this.native.activate(siteKeyOrProvider, isTokenAutoRefreshEnabled);
|
|
36
55
|
}
|
|
37
56
|
|
package/lib/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
module.exports = '14.
|
|
2
|
+
module.exports = '14.4.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-firebase/app-check",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.4.0",
|
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
|
5
5
|
"description": "React Native Firebase - App Check",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"appCheck"
|
|
24
24
|
],
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@react-native-firebase/app": "14.
|
|
26
|
+
"@react-native-firebase/app": "14.4.0"
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "a21797813bdac784232b0275f112d7f1524eb222"
|
|
32
32
|
}
|