You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/app-check/usage/index.md
+7-15Lines changed: 7 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,8 +117,6 @@ rnfbProvider.configure({
117
117
});
118
118
```
119
119
120
-
Note that the available
121
-
122
120
### Install the Custom Provider
123
121
124
122
Once you have the custom provider configured, install it in app-check using the firebase-js-sdk compatible API:
@@ -143,13 +141,7 @@ The [official documentation](https://firebase.google.com/docs/app-check/web/cust
143
141
144
142
### on iOS
145
143
146
-
App Check may be used in CI environments by following the upstream documentation to configure a debug token shared with your app in the CI environment.
147
-
148
-
In certain react-native testing scenarios it may be difficult to access the shared secret, but the react-native-firebase testing app for e2e testing does successfully fetch App Check tokens via setting an environment variable and initializing the debug provider before firebase configure in AppDelegate.m for iOS.
149
-
150
-
This method mainly consists of setting an environment variable in a way that it is visible to the Simulator as it starts up. That environment variable is automatically seen and used by the Firebase Debug provider on iOS.
151
-
152
-
In a future release, the debugToken parameter of the CustomProvider apple options should allow for more dynamic configuration, PRs to the Apple CustomProvider are welcome if you are motivated to implement this feature.
144
+
The react-native-firebase CustomProvider implementation allows for runtime configuration of the `debug` provider as well as a `debugToken` in the `android` CustomProvider options. This allows the easy use of a token pre-configured in the Firebase console, allowing for dynamic configuration and testing of AppCheck in CI environments or Android Emulators.
153
145
154
146
### on Android
155
147
@@ -159,20 +151,20 @@ There are a variety of other ways to obtain and configure debug tokens for AppCh
159
151
160
152
#### A) When testing on an actual android device (debug build)
161
153
162
-
1. Start your application on the android device.
163
-
2. Use `$adb logcat | grep DebugAppCheckProvider` to grab your temporary secret from the android logs. The output should look lit this:
154
+
1.Start your application on the android device.
155
+
2.Use `$adb logcat | grep DebugAppCheckProvider` to grab your temporary secret from the android logs. The output should look lit this:
164
156
165
157
D DebugAppCheckProvider: Enter this debug secret into the allow list in
166
158
the Firebase Console for your project: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
167
159
168
-
3. In the [Project Settings > App Check](https://console.firebase.google.com/project/_/settings/appcheck) section of the Firebase console, choose _Manage debug tokens_ from your app's overflow menu. Then, register the debug token you logged in the previous step.
160
+
3.In the [Project Settings > App Check](https://console.firebase.google.com/project/_/settings/appcheck) section of the Firebase console, choose _Manage debug tokens_ from your app's overflow menu. Then, register the debug token you logged in the previous step.
169
161
170
162
#### B) Specifying a generated `FIREBASE_APP_CHECK_DEBUG_TOKEN` -- building for CI/CD (debug build)
171
163
172
164
When you want to test using an Android virtual device -or- when you prefer to (re)use a token of your choice -- e.g. when configuring a CI/CD pipeline -- use the following steps:
173
165
174
-
1. In the [Project Settings > App Check](https://console.firebase.google.com/project/_/settings/appcheck) section of the Firebase console, choose _Manage debug tokens_ from your app's overflow menu. Then, register a new debug token by clicking the _Add debug token_ button, then _Generate token_.
175
-
2. Pass the token you created in the previous step by supplying a `FIREBASE_APP_CHECK_DEBUG_TOKEN` environment variable to the process that build your react-native android app. e.g.:
166
+
1.In the [Project Settings > App Check](https://console.firebase.google.com/project/_/settings/appcheck) section of the Firebase console, choose _Manage debug tokens_ from your app's overflow menu. Then, register a new debug token by clicking the _Add debug token_ button, then _Generate token_.
167
+
2.Pass the token you created in the previous step by supplying a `FIREBASE_APP_CHECK_DEBUG_TOKEN` environment variable to the process that build your react-native android app. e.g.:
0 commit comments