@react-native-firebase/app-check 25.0.1 → 26.0.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 +36 -0
- package/RNFBAppCheck.podspec +18 -6
- package/android/build.gradle +19 -0
- package/android/src/main/java/io/invertase/firebase/appcheck/{ReactNativeFirebaseAppCheckModule.java → NativeRNFBTurboAppCheck.java} +46 -34
- package/android/src/main/java/io/invertase/firebase/appcheck/ReactNativeFirebaseAppCheckPackage.java +1 -1
- package/android/src/main/java/io/invertase/firebase/appcheck/ReactNativeFirebaseAppCheckProvider.java +9 -0
- package/android/src/main/java/io/invertase/firebase/appcheck/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboAppCheckSpec.java +67 -0
- package/android/src/main/java/io/invertase/firebase/appcheck/generated/jni/CMakeLists.txt +36 -0
- package/android/src/main/java/io/invertase/firebase/appcheck/generated/jni/RNFBAppCheckTurboModules-generated.cpp +74 -0
- package/android/src/main/java/io/invertase/firebase/appcheck/generated/jni/RNFBAppCheckTurboModules.h +31 -0
- package/android/src/main/java/io/invertase/firebase/appcheck/generated/jni/react/renderer/components/RNFBAppCheckTurboModules/RNFBAppCheckTurboModulesJSI-generated.cpp +85 -0
- package/android/src/main/java/io/invertase/firebase/appcheck/generated/jni/react/renderer/components/RNFBAppCheckTurboModules/RNFBAppCheckTurboModulesJSI.h +174 -0
- package/app.plugin.js +1 -1
- package/dist/module/index.js +210 -6
- package/dist/module/index.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/lib/index.d.ts +19 -4
- package/dist/typescript/lib/index.d.ts.map +1 -1
- package/dist/typescript/lib/types/appcheck.d.ts +5 -0
- package/dist/typescript/lib/types/appcheck.d.ts.map +1 -1
- package/dist/typescript/lib/types/internal.d.ts +1 -1
- package/dist/typescript/lib/types/internal.d.ts.map +1 -1
- package/dist/typescript/lib/version.d.ts +1 -1
- package/ios/RNFBAppCheck/RNFBAppCheckModule.h +3 -8
- package/ios/RNFBAppCheck/{RNFBAppCheckModule.m → RNFBAppCheckModule.mm} +66 -43
- package/ios/RNFBAppCheck/RNFBAppCheckProvider.m +11 -1
- package/ios/RNFBAppCheck.xcodeproj/project.pbxproj +8 -8
- package/ios/generated/RCTAppDependencyProvider.h +25 -0
- package/ios/generated/RCTAppDependencyProvider.mm +55 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
- package/ios/generated/RNFBAppCheckTurboModules/RNFBAppCheckTurboModules-generated.mm +88 -0
- package/ios/generated/RNFBAppCheckTurboModules/RNFBAppCheckTurboModules.h +85 -0
- package/ios/generated/RNFBAppCheckTurboModulesJSI-generated.cpp +85 -0
- package/ios/generated/RNFBAppCheckTurboModulesJSI.h +174 -0
- package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
- package/lib/index.ts +335 -8
- package/lib/types/appcheck.ts +6 -0
- package/lib/types/internal.ts +1 -1
- package/lib/version.ts +1 -1
- package/package.json +30 -5
- package/plugin/build/app.plugin.d.ts +2 -0
- package/plugin/build/app.plugin.js +6 -0
- package/plugin/build/ios/appDelegate.js +18 -4
- package/plugin/src/app.plugin.ts +3 -0
- package/plugin/src/ios/appDelegate.ts +23 -4
- package/plugin/tsconfig.tsbuildinfo +1 -1
- package/react-native.config.js +10 -0
- package/specs/NativeRNFBTurboAppCheck.ts +27 -0
- package/typedoc.json +1 -1
- package/dist/module/modular.js +0 -93
- package/dist/module/modular.js.map +0 -1
- package/dist/module/namespaced.js +0 -194
- package/dist/module/namespaced.js.map +0 -1
- package/dist/module/types/namespaced.js +0 -60
- package/dist/module/types/namespaced.js.map +0 -1
- package/dist/typescript/lib/modular.d.ts +0 -56
- package/dist/typescript/lib/modular.d.ts.map +0 -1
- package/dist/typescript/lib/namespaced.d.ts +0 -12
- package/dist/typescript/lib/namespaced.d.ts.map +0 -1
- package/dist/typescript/lib/types/namespaced.d.ts +0 -358
- package/dist/typescript/lib/types/namespaced.d.ts.map +0 -1
- package/lib/modular.ts +0 -157
- package/lib/namespaced.ts +0 -286
- package/lib/types/namespaced.ts +0 -422
package/package.json
CHANGED
|
@@ -1,17 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-firebase/app-check",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.0",
|
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
|
5
5
|
"description": "React Native Firebase - App Check",
|
|
6
6
|
"main": "./dist/module/index.js",
|
|
7
7
|
"types": "./dist/typescript/lib/index.d.ts",
|
|
8
|
+
"codegenConfig": {
|
|
9
|
+
"name": "RNFBAppCheckTurboModules",
|
|
10
|
+
"type": "modules",
|
|
11
|
+
"jsSrcsDir": "specs",
|
|
12
|
+
"includesGeneratedCode": true,
|
|
13
|
+
"android": {
|
|
14
|
+
"javaPackageName": "io.invertase.firebase.appcheck"
|
|
15
|
+
},
|
|
16
|
+
"ios": {
|
|
17
|
+
"modulesProvider": {
|
|
18
|
+
"NativeRNFBTurboAppCheck": "RNFBAppCheckModule"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
8
22
|
"scripts": {
|
|
9
23
|
"build": "genversion --esm --semi lib/version.ts",
|
|
10
24
|
"build:clean": "rimraf android/build && rimraf ios/build",
|
|
11
25
|
"build:plugin": "rimraf plugin/build && tsc --build plugin",
|
|
12
26
|
"lint:plugin": "eslint plugin/src/*",
|
|
13
27
|
"compile": "bob build",
|
|
14
|
-
"prepare": "yarn run build && yarn compile && yarn run build:plugin"
|
|
28
|
+
"prepare": "yarn run build && yarn compile && yarn run build:plugin",
|
|
29
|
+
"codegen": "yarn android:codegen && yarn ios:codegen",
|
|
30
|
+
"android:codegen": "npx @react-native-community/cli codegen --platform android --outputPath=./android/src/main/java/io/invertase/firebase/appcheck/generated",
|
|
31
|
+
"ios:codegen": "npx @react-native-community/cli codegen --platform ios --outputPath=./ios/generated"
|
|
15
32
|
},
|
|
16
33
|
"repository": {
|
|
17
34
|
"type": "git",
|
|
@@ -26,10 +43,11 @@
|
|
|
26
43
|
"appCheck"
|
|
27
44
|
],
|
|
28
45
|
"peerDependencies": {
|
|
29
|
-
"@react-native-firebase/app": "
|
|
46
|
+
"@react-native-firebase/app": "26.0.0",
|
|
30
47
|
"expo": ">=47.0.0"
|
|
31
48
|
},
|
|
32
49
|
"devDependencies": {
|
|
50
|
+
"@react-native-firebase/app": "26.0.0",
|
|
33
51
|
"expo": "^55.0.18",
|
|
34
52
|
"react-native-builder-bob": "^0.41.0",
|
|
35
53
|
"typescript": "^6.0.3"
|
|
@@ -49,7 +67,14 @@
|
|
|
49
67
|
"types": "./dist/typescript/lib/index.d.ts",
|
|
50
68
|
"default": "./dist/module/index.js"
|
|
51
69
|
},
|
|
52
|
-
"./app.plugin
|
|
70
|
+
"./app.plugin": {
|
|
71
|
+
"types": "./plugin/build/app.plugin.d.ts",
|
|
72
|
+
"default": "./app.plugin.js"
|
|
73
|
+
},
|
|
74
|
+
"./app.plugin.js": {
|
|
75
|
+
"types": "./plugin/build/app.plugin.d.ts",
|
|
76
|
+
"default": "./app.plugin.js"
|
|
77
|
+
},
|
|
53
78
|
"./package.json": "./package.json"
|
|
54
79
|
},
|
|
55
80
|
"react-native-builder-bob": {
|
|
@@ -74,5 +99,5 @@
|
|
|
74
99
|
"node_modules/",
|
|
75
100
|
"dist/"
|
|
76
101
|
],
|
|
77
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "2a360acb2aebdd39dd40e31be386b30697270626"
|
|
78
103
|
}
|
|
@@ -14,16 +14,29 @@ const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
|
|
|
14
14
|
const fs_1 = __importDefault(require("fs"));
|
|
15
15
|
const path_1 = __importDefault(require("path"));
|
|
16
16
|
const methodInvocationBlock = `[RNFBAppCheckModule sharedInstance];`;
|
|
17
|
+
// Match docs / AppDelegate examples: quoted local header import (not angle brackets).
|
|
18
|
+
const appCheckModuleImportQuoted = '#import "RNFBAppCheckModule.h"';
|
|
19
|
+
const appCheckModuleImportAngle = '#import <RNFBAppCheckModule.h>';
|
|
20
|
+
function hasAppCheckModuleImport(contents) {
|
|
21
|
+
return (contents.includes(appCheckModuleImportQuoted) || contents.includes(appCheckModuleImportAngle));
|
|
22
|
+
}
|
|
23
|
+
function preferQuotedAppCheckModuleImport(contents) {
|
|
24
|
+
if (contents.includes(appCheckModuleImportAngle)) {
|
|
25
|
+
return contents.split(appCheckModuleImportAngle).join(appCheckModuleImportQuoted);
|
|
26
|
+
}
|
|
27
|
+
return contents;
|
|
28
|
+
}
|
|
17
29
|
// https://regex101.com/r/mPgaq6/1
|
|
18
30
|
const methodInvocationLineMatcher = /(?:self\.moduleName\s*=\s*@\"([^"]*)\";)|(?:(self\.|_)(\w+)\s?=\s?\[\[UMModuleRegistryAdapter alloc\])|(?:RCTBridge\s?\*\s?(\w+)\s?=\s?\[(\[RCTBridge alloc\]|self\.reactDelegate))/g;
|
|
19
31
|
// https://regex101.com/r/nHrTa9/1/
|
|
20
32
|
// if the above regex fails, we can use this one as a fallback:
|
|
21
33
|
const fallbackInvocationLineMatcher = /-\s*\(BOOL\)\s*application:\s*\(UIApplication\s*\*\s*\)\s*\w+\s+didFinishLaunchingWithOptions:/g;
|
|
22
34
|
function modifyObjcAppDelegate(contents) {
|
|
35
|
+
contents = preferQuotedAppCheckModuleImport(contents);
|
|
23
36
|
// Add import
|
|
24
|
-
if (!contents
|
|
37
|
+
if (!hasAppCheckModuleImport(contents)) {
|
|
25
38
|
contents = contents.replace(/#import "AppDelegate.h"/g, `#import "AppDelegate.h"
|
|
26
|
-
|
|
39
|
+
${appCheckModuleImportQuoted}`);
|
|
27
40
|
}
|
|
28
41
|
// To avoid potential issues with existing changes from older plugin versions
|
|
29
42
|
if (contents.includes(methodInvocationBlock)) {
|
|
@@ -84,8 +97,9 @@ function modifySwiftBridgingHeader(projectRoot) {
|
|
|
84
97
|
}
|
|
85
98
|
}
|
|
86
99
|
function modifySwiftBridgingHeaderContents(contents) {
|
|
87
|
-
|
|
88
|
-
|
|
100
|
+
contents = preferQuotedAppCheckModuleImport(contents);
|
|
101
|
+
if (!hasAppCheckModuleImport(contents)) {
|
|
102
|
+
contents += `\n${appCheckModuleImportQuoted}\n`;
|
|
89
103
|
}
|
|
90
104
|
return contents;
|
|
91
105
|
}
|
|
@@ -5,6 +5,23 @@ import fs from 'fs';
|
|
|
5
5
|
import path from 'path';
|
|
6
6
|
|
|
7
7
|
const methodInvocationBlock = `[RNFBAppCheckModule sharedInstance];`;
|
|
8
|
+
// Match docs / AppDelegate examples: quoted local header import (not angle brackets).
|
|
9
|
+
const appCheckModuleImportQuoted = '#import "RNFBAppCheckModule.h"';
|
|
10
|
+
const appCheckModuleImportAngle = '#import <RNFBAppCheckModule.h>';
|
|
11
|
+
|
|
12
|
+
function hasAppCheckModuleImport(contents: string): boolean {
|
|
13
|
+
return (
|
|
14
|
+
contents.includes(appCheckModuleImportQuoted) || contents.includes(appCheckModuleImportAngle)
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function preferQuotedAppCheckModuleImport(contents: string): string {
|
|
19
|
+
if (contents.includes(appCheckModuleImportAngle)) {
|
|
20
|
+
return contents.split(appCheckModuleImportAngle).join(appCheckModuleImportQuoted);
|
|
21
|
+
}
|
|
22
|
+
return contents;
|
|
23
|
+
}
|
|
24
|
+
|
|
8
25
|
// https://regex101.com/r/mPgaq6/1
|
|
9
26
|
const methodInvocationLineMatcher =
|
|
10
27
|
/(?:self\.moduleName\s*=\s*@\"([^"]*)\";)|(?:(self\.|_)(\w+)\s?=\s?\[\[UMModuleRegistryAdapter alloc\])|(?:RCTBridge\s?\*\s?(\w+)\s?=\s?\[(\[RCTBridge alloc\]|self\.reactDelegate))/g;
|
|
@@ -15,12 +32,13 @@ const fallbackInvocationLineMatcher =
|
|
|
15
32
|
/-\s*\(BOOL\)\s*application:\s*\(UIApplication\s*\*\s*\)\s*\w+\s+didFinishLaunchingWithOptions:/g;
|
|
16
33
|
|
|
17
34
|
export function modifyObjcAppDelegate(contents: string): string {
|
|
35
|
+
contents = preferQuotedAppCheckModuleImport(contents);
|
|
18
36
|
// Add import
|
|
19
|
-
if (!contents
|
|
37
|
+
if (!hasAppCheckModuleImport(contents)) {
|
|
20
38
|
contents = contents.replace(
|
|
21
39
|
/#import "AppDelegate.h"/g,
|
|
22
40
|
`#import "AppDelegate.h"
|
|
23
|
-
|
|
41
|
+
${appCheckModuleImportQuoted}`,
|
|
24
42
|
);
|
|
25
43
|
}
|
|
26
44
|
|
|
@@ -91,8 +109,9 @@ export function modifySwiftBridgingHeader(projectRoot: string): void {
|
|
|
91
109
|
}
|
|
92
110
|
|
|
93
111
|
export function modifySwiftBridgingHeaderContents(contents: string): string {
|
|
94
|
-
|
|
95
|
-
|
|
112
|
+
contents = preferQuotedAppCheckModuleImport(contents);
|
|
113
|
+
if (!hasAppCheckModuleImport(contents)) {
|
|
114
|
+
contents += `\n${appCheckModuleImportQuoted}\n`;
|
|
96
115
|
}
|
|
97
116
|
return contents;
|
|
98
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/index.ts","./src/ios/appDelegate.ts","./src/ios/index.ts"],"version":"6.0.3"}
|
|
1
|
+
{"root":["./src/app.plugin.ts","./src/index.ts","./src/ios/appDelegate.ts","./src/ios/index.ts"],"version":"6.0.3"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
|
2
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export interface AppCheckTokenResult {
|
|
5
|
+
token: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface Spec extends TurboModule {
|
|
9
|
+
activate(
|
|
10
|
+
appName: string,
|
|
11
|
+
siteKeyProvider: string,
|
|
12
|
+
isTokenAutoRefreshEnabled: boolean,
|
|
13
|
+
): Promise<void>;
|
|
14
|
+
configureProvider(
|
|
15
|
+
appName: string,
|
|
16
|
+
providerName: string,
|
|
17
|
+
debugToken?: string | null,
|
|
18
|
+
): Promise<void>;
|
|
19
|
+
setTokenAutoRefreshEnabled(appName: string, isTokenAutoRefreshEnabled: boolean): void;
|
|
20
|
+
isTokenAutoRefreshEnabled(appName: string): Promise<boolean>;
|
|
21
|
+
getToken(appName: string, forceRefresh: boolean): Promise<AppCheckTokenResult>;
|
|
22
|
+
getLimitedUseToken(appName: string): Promise<AppCheckTokenResult>;
|
|
23
|
+
addAppCheckListener(appName: string): void;
|
|
24
|
+
removeAppCheckListener(appName: string): void;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('NativeRNFBTurboAppCheck');
|
package/typedoc.json
CHANGED
package/dist/module/modular.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this library except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
* See the License for the specific language governing permissions and
|
|
16
|
-
* limitations under the License.
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
import { getApp } from '@react-native-firebase/app';
|
|
21
|
-
import { MODULAR_DEPRECATION_ARG } from '@react-native-firebase/app/dist/module/common';
|
|
22
|
-
export { CustomProvider, ReactNativeFirebaseAppCheckProvider } from "./providers.js";
|
|
23
|
-
/**
|
|
24
|
-
* Activate App Check for the given app. Can be called only once per app.
|
|
25
|
-
* @param app - The app to initialize App Check for. Optional.
|
|
26
|
-
* @param options - App Check options.
|
|
27
|
-
* @returns Promise<AppCheck>
|
|
28
|
-
*/
|
|
29
|
-
export async function initializeAppCheck(app, options) {
|
|
30
|
-
const appInstance = app ? getApp(app.name) : getApp();
|
|
31
|
-
const appCheck = appInstance.appCheck();
|
|
32
|
-
await appCheck.initializeAppCheck.call(appCheck, options, MODULAR_DEPRECATION_ARG);
|
|
33
|
-
return appCheck;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Get the current App Check token. Attaches to the most recent in-flight request if one is present.
|
|
38
|
-
* Returns null if no token is present and no token requests are in-flight.
|
|
39
|
-
* @param appCheckInstance - The App Check instance.
|
|
40
|
-
* @param forceRefresh - Whether to force refresh the token. Optional
|
|
41
|
-
* @returns Promise<AppCheckTokenResult>
|
|
42
|
-
*/
|
|
43
|
-
export function getToken(appCheckInstance, forceRefresh) {
|
|
44
|
-
return appCheckInstance.getToken.call(appCheckInstance, forceRefresh, MODULAR_DEPRECATION_ARG);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Get a limited-use (consumable) App Check token.
|
|
49
|
-
* For use with server calls to firebase functions or custom backends using the firebase admin SDK.
|
|
50
|
-
* @param appCheckInstance - The App Check instance.
|
|
51
|
-
* @returns Promise<AppCheckTokenResult>
|
|
52
|
-
*/
|
|
53
|
-
export function getLimitedUseToken(appCheckInstance) {
|
|
54
|
-
return appCheckInstance.getLimitedUseToken.call(appCheckInstance, MODULAR_DEPRECATION_ARG);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Set whether App Check will automatically refresh tokens as needed.
|
|
59
|
-
* @param appCheckInstance - The App Check instance.
|
|
60
|
-
* @param isAutoRefreshEnabled - Whether to enable auto-refresh.
|
|
61
|
-
*/
|
|
62
|
-
export function setTokenAutoRefreshEnabled(appCheckInstance, isAutoRefreshEnabled) {
|
|
63
|
-
appCheckInstance.setTokenAutoRefreshEnabled.call(appCheckInstance, isAutoRefreshEnabled, MODULAR_DEPRECATION_ARG);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Registers a listener to changes in the token state. There can be more
|
|
68
|
-
* than one listener registered at the same time for one or more
|
|
69
|
-
* App Check instances. The listeners call back on the UI thread whenever
|
|
70
|
-
* the current token associated with this App Check instance changes.
|
|
71
|
-
*
|
|
72
|
-
* @param appCheckInstance - The App Check instance.
|
|
73
|
-
* @param observer - The listener to register.
|
|
74
|
-
* @returns Unsubscribe
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Registers a listener to changes in the token state. There can be more
|
|
79
|
-
* than one listener registered at the same time for one or more
|
|
80
|
-
* App Check instances. The listeners call back on the UI thread whenever
|
|
81
|
-
* the current token associated with this App Check instance changes.
|
|
82
|
-
*
|
|
83
|
-
* @param appCheckInstance - The App Check instance.
|
|
84
|
-
* @param onNext - The callback function for token changes.
|
|
85
|
-
* @param onError - Optional error callback.
|
|
86
|
-
* @param onCompletion - Optional completion callback.
|
|
87
|
-
* @returns Unsubscribe
|
|
88
|
-
*/
|
|
89
|
-
|
|
90
|
-
export function onTokenChanged(appCheckInstance, onNextOrObserver, onError, onCompletion) {
|
|
91
|
-
return appCheckInstance.onTokenChanged.call(appCheckInstance, onNextOrObserver, onError, onCompletion, MODULAR_DEPRECATION_ARG);
|
|
92
|
-
}
|
|
93
|
-
//# sourceMappingURL=modular.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getApp","MODULAR_DEPRECATION_ARG","CustomProvider","ReactNativeFirebaseAppCheckProvider","initializeAppCheck","app","options","appInstance","name","appCheck","call","getToken","appCheckInstance","forceRefresh","getLimitedUseToken","setTokenAutoRefreshEnabled","isAutoRefreshEnabled","onTokenChanged","onNextOrObserver","onError","onCompletion"],"sourceRoot":"../../lib","sources":["modular.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAA0B,4BAA4B;AACrE,SAASC,uBAAuB,QAAQ,+CAA+C;AAWvF,SAASC,cAAc,EAAEC,mCAAmC,QAAQ,gBAAa;AAMjF;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,kBAAkBA,CACtCC,GAAiB,EACjBC,OAAyB,EACN;EACnB,MAAMC,WAAW,GAAGF,GAAG,GAAIL,MAAM,CAACK,GAAG,CAACG,IAAI,CAAC,GAAoBR,MAAM,CAAC,CAAiB;EACvF,MAAMS,QAAQ,GAAGF,WAAW,CAACE,QAAQ,CAAC,CAAC;EACvC,MACGA,QAAQ,CAAsBL,kBAAkB,CAGjDM,IAAI,CAACD,QAAQ,EAAEH,OAAO,EAAqBL,uBAAuB,CAAC;EACrE,OAAOQ,QAAQ;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,QAAQA,CACtBC,gBAA0B,EAC1BC,YAAsB,EACQ;EAC9B,OACGD,gBAAgB,CAAsBD,QAAQ,CAG/CD,IAAI,CAACE,gBAAgB,EAAEC,YAAY,EAAEZ,uBAAuB,CAAC;AACjE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASa,kBAAkBA,CAACF,gBAA0B,EAAgC;EAC3F,OACGA,gBAAgB,CAAsBE,kBAAkB,CAGzDJ,IAAI,CAACE,gBAAgB,EAAEX,uBAAuB,CAAC;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASc,0BAA0BA,CACxCH,gBAA0B,EAC1BI,oBAA6B,EACvB;EAEHJ,gBAAgB,CAAsBG,0BAA0B,CAGjEL,IAAI,CAACE,gBAAgB,EAAEI,oBAAoB,EAAEf,uBAAuB,CAAC;AACzE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,OAAO,SAASgB,cAAcA,CAC5BL,gBAA0B,EAC1BM,gBAEgD,EAChDC,OAAgC,EAChCC,YAAyB,EACZ;EACb,OACGR,gBAAgB,CAAsBK,cAAc,CAGrDP,IAAI,CACJE,gBAAgB,EAChBM,gBAAgB,EAChBC,OAAO,EACPC,YAAY,EACZnB,uBACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this library except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
* See the License for the specific language governing permissions and
|
|
16
|
-
* limitations under the License.
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
import { isBoolean, isIOS, isString, isObject, isUndefined, isOther, parseListenerOrObserver } from '@react-native-firebase/app/dist/module/common';
|
|
21
|
-
import { createModuleNamespace, FirebaseModule, getFirebaseRoot } from '@react-native-firebase/app/dist/module/internal';
|
|
22
|
-
import { Platform } from 'react-native';
|
|
23
|
-
import { setReactNativeModule } from '@react-native-firebase/app/dist/module/internal/nativeModule';
|
|
24
|
-
import fallBackModule from './web/RNFBAppCheckModule';
|
|
25
|
-
import { version } from "./version.js";
|
|
26
|
-
import { CustomProvider, ReactNativeFirebaseAppCheckProvider } from "./providers.js";
|
|
27
|
-
const namespace = 'appCheck';
|
|
28
|
-
const nativeModuleName = 'RNFBAppCheckModule';
|
|
29
|
-
const statics = {
|
|
30
|
-
CustomProvider
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Type guard to check if a provider has providerOptions.
|
|
35
|
-
* This provides proper type narrowing for providers that support platform-specific configuration.
|
|
36
|
-
*/
|
|
37
|
-
function hasProviderOptions(provider) {
|
|
38
|
-
return provider !== undefined && 'providerOptions' in provider && provider.providerOptions !== undefined;
|
|
39
|
-
}
|
|
40
|
-
class FirebaseAppCheckModule extends FirebaseModule {
|
|
41
|
-
constructor(app, config, customUrlOrRegion) {
|
|
42
|
-
super(app, config, customUrlOrRegion);
|
|
43
|
-
this.emitter.addListener(this.eventNameForApp('appCheck_token_changed'), event => {
|
|
44
|
-
this.emitter.emit(this.eventNameForApp('onAppCheckTokenChanged'), event);
|
|
45
|
-
});
|
|
46
|
-
this._listenerCount = 0;
|
|
47
|
-
}
|
|
48
|
-
getIsTokenRefreshEnabledDefault() {
|
|
49
|
-
// no default to start
|
|
50
|
-
let isTokenAutoRefreshEnabled = undefined;
|
|
51
|
-
return isTokenAutoRefreshEnabled;
|
|
52
|
-
}
|
|
53
|
-
newReactNativeFirebaseAppCheckProvider() {
|
|
54
|
-
return new ReactNativeFirebaseAppCheckProvider();
|
|
55
|
-
}
|
|
56
|
-
initializeAppCheck(options) {
|
|
57
|
-
if (isOther) {
|
|
58
|
-
if (!isObject(options)) {
|
|
59
|
-
throw new Error('Invalid configuration: no options defined.');
|
|
60
|
-
}
|
|
61
|
-
if (isUndefined(options.provider)) {
|
|
62
|
-
throw new Error('Invalid configuration: no provider defined.');
|
|
63
|
-
}
|
|
64
|
-
return this.native.initializeAppCheck(options);
|
|
65
|
-
}
|
|
66
|
-
// determine token refresh setting, if not specified
|
|
67
|
-
if (!isBoolean(options.isTokenAutoRefreshEnabled)) {
|
|
68
|
-
const tokenRefresh = this.firebaseJson.app_check_token_auto_refresh;
|
|
69
|
-
if (isBoolean(tokenRefresh)) {
|
|
70
|
-
options.isTokenAutoRefreshEnabled = tokenRefresh;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// If that was not defined, attempt to use app-wide data collection setting per docs:
|
|
75
|
-
if (!isBoolean(options.isTokenAutoRefreshEnabled)) {
|
|
76
|
-
const dataCollection = this.firebaseJson.app_data_collection_default_enabled;
|
|
77
|
-
if (isBoolean(dataCollection)) {
|
|
78
|
-
options.isTokenAutoRefreshEnabled = dataCollection;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// If that also was not defined, the default is documented as true.
|
|
83
|
-
if (!isBoolean(options.isTokenAutoRefreshEnabled)) {
|
|
84
|
-
options.isTokenAutoRefreshEnabled = true;
|
|
85
|
-
}
|
|
86
|
-
this.native.setTokenAutoRefreshEnabled(options.isTokenAutoRefreshEnabled);
|
|
87
|
-
if (!hasProviderOptions(options.provider)) {
|
|
88
|
-
throw new Error('Invalid configuration: no provider or no provider options defined.');
|
|
89
|
-
}
|
|
90
|
-
const provider = options.provider;
|
|
91
|
-
if (Platform.OS === 'android') {
|
|
92
|
-
if (!isString(provider.providerOptions?.android?.provider)) {
|
|
93
|
-
throw new Error('Invalid configuration: no android provider configured while on android platform.');
|
|
94
|
-
}
|
|
95
|
-
return this.native.configureProvider(provider.providerOptions.android.provider, provider.providerOptions.android.debugToken);
|
|
96
|
-
}
|
|
97
|
-
if (Platform.OS === 'ios' || Platform.OS === 'macos') {
|
|
98
|
-
if (!isString(provider.providerOptions?.apple?.provider)) {
|
|
99
|
-
throw new Error('Invalid configuration: no apple provider configured while on apple platform.');
|
|
100
|
-
}
|
|
101
|
-
return this.native.configureProvider(provider.providerOptions.apple.provider, provider.providerOptions.apple.debugToken);
|
|
102
|
-
}
|
|
103
|
-
throw new Error('Unsupported platform: ' + Platform.OS);
|
|
104
|
-
}
|
|
105
|
-
activate(siteKeyOrProvider, isTokenAutoRefreshEnabled) {
|
|
106
|
-
if (isOther) {
|
|
107
|
-
throw new Error('firebase.appCheck().activate(*) is not supported on other platforms');
|
|
108
|
-
}
|
|
109
|
-
if (!isString(siteKeyOrProvider)) {
|
|
110
|
-
throw new Error('siteKeyOrProvider must be a string value to match firebase-js-sdk API');
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// We wrap our new flexible interface, with compatible defaults
|
|
114
|
-
const rnfbProvider = new ReactNativeFirebaseAppCheckProvider();
|
|
115
|
-
rnfbProvider.configure({
|
|
116
|
-
android: {
|
|
117
|
-
provider: 'playIntegrity'
|
|
118
|
-
},
|
|
119
|
-
apple: {
|
|
120
|
-
provider: 'deviceCheck'
|
|
121
|
-
},
|
|
122
|
-
web: {
|
|
123
|
-
provider: 'reCaptchaV3',
|
|
124
|
-
siteKey: 'none'
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
return this.initializeAppCheck({
|
|
128
|
-
provider: rnfbProvider,
|
|
129
|
-
isTokenAutoRefreshEnabled
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// TODO this is an async call
|
|
134
|
-
setTokenAutoRefreshEnabled(isTokenAutoRefreshEnabled) {
|
|
135
|
-
this.native.setTokenAutoRefreshEnabled(isTokenAutoRefreshEnabled);
|
|
136
|
-
}
|
|
137
|
-
getToken(forceRefresh) {
|
|
138
|
-
if (!forceRefresh) {
|
|
139
|
-
return this.native.getToken(false);
|
|
140
|
-
} else {
|
|
141
|
-
return this.native.getToken(true);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
getLimitedUseToken() {
|
|
145
|
-
return this.native.getLimitedUseToken();
|
|
146
|
-
}
|
|
147
|
-
onTokenChanged(onNextOrObserver, _onError, _onCompletion) {
|
|
148
|
-
// iOS does not provide any native listening feature
|
|
149
|
-
if (isIOS) {
|
|
150
|
-
// eslint-disable-next-line no-console
|
|
151
|
-
console.warn('onTokenChanged is not implemented on IOS, only for Android');
|
|
152
|
-
return () => {};
|
|
153
|
-
}
|
|
154
|
-
const nextFn = parseListenerOrObserver(onNextOrObserver);
|
|
155
|
-
// let errorFn = function () { };
|
|
156
|
-
// if (onNextOrObserver.error != null) {
|
|
157
|
-
// errorFn = onNextOrObserver.error.bind(onNextOrObserver);
|
|
158
|
-
// }
|
|
159
|
-
// else if (onError) {
|
|
160
|
-
// errorFn = onError;
|
|
161
|
-
// }
|
|
162
|
-
const subscription = this.emitter.addListener(this.eventNameForApp('onAppCheckTokenChanged'), nextFn);
|
|
163
|
-
if (this._listenerCount === 0) this.native.addAppCheckListener();
|
|
164
|
-
this._listenerCount++;
|
|
165
|
-
return () => {
|
|
166
|
-
subscription.remove();
|
|
167
|
-
this._listenerCount--;
|
|
168
|
-
if (this._listenerCount === 0) this.native.removeAppCheckListener();
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
export const SDK_VERSION = version;
|
|
173
|
-
const appCheckNamespace = createModuleNamespace({
|
|
174
|
-
statics,
|
|
175
|
-
version,
|
|
176
|
-
namespace,
|
|
177
|
-
nativeModuleName,
|
|
178
|
-
nativeEvents: ['appCheck_token_changed'],
|
|
179
|
-
hasMultiAppSupport: true,
|
|
180
|
-
hasCustomUrlOrRegionSupport: false,
|
|
181
|
-
ModuleClass: FirebaseAppCheckModule
|
|
182
|
-
});
|
|
183
|
-
// import appCheck from '@react-native-firebase/app-check';
|
|
184
|
-
// appCheck().X(...);
|
|
185
|
-
export default appCheckNamespace;
|
|
186
|
-
|
|
187
|
-
// import appCheck, { firebase } from '@react-native-firebase/app-check';
|
|
188
|
-
// appCheck().X(...);
|
|
189
|
-
// firebase.appCheck().X(...);
|
|
190
|
-
export const firebase = getFirebaseRoot();
|
|
191
|
-
|
|
192
|
-
// Register the interop module for non-native platforms.
|
|
193
|
-
setReactNativeModule(nativeModuleName, fallBackModule);
|
|
194
|
-
//# sourceMappingURL=namespaced.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["isBoolean","isIOS","isString","isObject","isUndefined","isOther","parseListenerOrObserver","createModuleNamespace","FirebaseModule","getFirebaseRoot","Platform","setReactNativeModule","fallBackModule","version","CustomProvider","ReactNativeFirebaseAppCheckProvider","namespace","nativeModuleName","statics","hasProviderOptions","provider","undefined","providerOptions","FirebaseAppCheckModule","constructor","app","config","customUrlOrRegion","emitter","addListener","eventNameForApp","event","emit","_listenerCount","getIsTokenRefreshEnabledDefault","isTokenAutoRefreshEnabled","newReactNativeFirebaseAppCheckProvider","initializeAppCheck","options","Error","native","tokenRefresh","firebaseJson","app_check_token_auto_refresh","dataCollection","app_data_collection_default_enabled","setTokenAutoRefreshEnabled","OS","android","configureProvider","debugToken","apple","activate","siteKeyOrProvider","rnfbProvider","configure","web","siteKey","getToken","forceRefresh","getLimitedUseToken","onTokenChanged","onNextOrObserver","_onError","_onCompletion","console","warn","nextFn","subscription","addAppCheckListener","remove","removeAppCheckListener","SDK_VERSION","appCheckNamespace","nativeEvents","hasMultiAppSupport","hasCustomUrlOrRegionSupport","ModuleClass","firebase"],"sourceRoot":"../../lib","sources":["namespaced.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,SAAS,EACTC,KAAK,EACLC,QAAQ,EACRC,QAAQ,EACRC,WAAW,EACXC,OAAO,EACPC,uBAAuB,QAClB,+CAA+C;AACtD,SACEC,qBAAqB,EACrBC,cAAc,EACdC,eAAe,QACV,iDAAiD;AAExD,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,oBAAoB,QAAQ,8DAA8D;AACnG,OAAOC,cAAc,MAAM,0BAA0B;AACrD,SAASC,OAAO,QAAQ,cAAW;AAUnC,SAASC,cAAc,EAAEC,mCAAmC,QAAQ,gBAAa;AAEjF,MAAMC,SAAS,GAAG,UAAU;AAE5B,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EhC;AACA;AACA;AACA,OAAO,MAAMK,QAAQ,GACnBrE,eAAe,CAAC,CAKf;;AAEH;AACAE,oBAAoB,CAACM,gBAAgB,EAAEL,cAAoD,CAAC","ignoreList":[]}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this library except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
* See the License for the specific language governing permissions and
|
|
16
|
-
* limitations under the License.
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* Firebase App Check package for React Native.
|
|
21
|
-
*
|
|
22
|
-
* #### Example 1
|
|
23
|
-
*
|
|
24
|
-
* Access the firebase export from the `appCheck` package:
|
|
25
|
-
*
|
|
26
|
-
* ```js
|
|
27
|
-
* import { firebase } from '@react-native-firebase/app-check';
|
|
28
|
-
*
|
|
29
|
-
* // firebase.appCheck().X
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
* #### Example 2
|
|
33
|
-
*
|
|
34
|
-
* Using the default export from the `appCheck` package:
|
|
35
|
-
*
|
|
36
|
-
* ```js
|
|
37
|
-
* import appCheck from '@react-native-firebase/app-check';
|
|
38
|
-
*
|
|
39
|
-
* // appCheck().X
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
42
|
-
* #### Example 3
|
|
43
|
-
*
|
|
44
|
-
* Using the default export from the `app` package:
|
|
45
|
-
*
|
|
46
|
-
* ```js
|
|
47
|
-
* import firebase from '@react-native-firebase/app';
|
|
48
|
-
* import '@react-native-firebase/app-check';
|
|
49
|
-
*
|
|
50
|
-
* // firebase.appCheck().X
|
|
51
|
-
* ```
|
|
52
|
-
* @deprecated Use the exported types directly instead. FirebaseAppCheckTypes namespace is kept for backwards compatibility.
|
|
53
|
-
* @firebase app-check
|
|
54
|
-
*/
|
|
55
|
-
/* eslint-disable @typescript-eslint/no-namespace */
|
|
56
|
-
export let FirebaseAppCheckTypes;
|
|
57
|
-
/**
|
|
58
|
-
* Attach namespace to `firebase.` and `FirebaseApp.`.
|
|
59
|
-
*/
|
|
60
|
-
//# sourceMappingURL=namespaced.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["FirebaseAppCheckTypes"],"sourceRoot":"../../../lib","sources":["types/namespaced.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,WACiBA,qBAAqB;AA6VtC;AACA;AACA","ignoreList":[]}
|