Skip to content

Commit ca50d6e

Browse files
docs(app-check): expo-dev-client support for App Check docs (#6136)
* expo-dev-client support for App Check Add explanation on how to configure App Check for testing on android emulators when using EAS expo-dev-client. * chore(lint): add expo-dev-client to spellcheck dictionary Co-authored-by: Mike Hardy <[email protected]>
1 parent a6dd0cd commit ca50d6e

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.spellcheck.dict.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ EEA
5454
Ehesp
5555
enum
5656
ESLint
57+
expo-dev-client
5758
Fastlane
5859
FCM
5960
firebase

docs/app-check/usage/index.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,32 @@ When you want to test using an Android virtual device -or- when you prefer to (r
116116
$ FIREBASE_APP_CHECK_DEBUG_TOKEN="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" react-native run-android
117117

118118
Please note that once the android app has successfully passed the app-checks controls on the device, it will keep passing them, whether you rebuild without the secret token or not. To completely reset app-check, you must first uninstall, and then re-build / install.
119+
120+
#### C) When using Expo Development Client
121+
122+
When using expo-dev-client, the process is a little different, especially on an android emulator.
123+
124+
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_.
125+
2. Pass the token you created in the previous step by supplying a `FIREBASE_APP_CHECK_DEBUG_TOKEN` environment variable in your eas.json development profile:
126+
127+
```json
128+
{
129+
...
130+
"build": {
131+
"development": {
132+
"developmentClient": true,
133+
"distribution": "internal",
134+
"env": {
135+
...
136+
"FIREBASE_APP_CHECK_DEBUG_TOKEN": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
137+
}
138+
},
139+
...
140+
},
141+
...
142+
}
143+
```
144+
145+
3. Rebuild your development client:
146+
147+
$ eas build --profile development --platform android

0 commit comments

Comments
 (0)