Skip to content

Commit 04bbe36

Browse files
Apply suggestions from code review
Co-authored-by: Kevin Cheung <[email protected]>
1 parent 015e24d commit 04bbe36

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

packages-exp/app-check-exp/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# @firebase/app-check
22

3-
This is the Firebase AppCheck component of the Firebase JS SDK.
3+
This is the Firebase App Check component of the Firebase JS SDK.
44

5-
**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**
5+
**This package is not intended for direct usage, and should only be used via the officially supported [`firebase`](https://www.npmjs.com/package/firebase) package.**

packages-exp/app-check-exp/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@firebase/app-check-exp",
33
"version": "0.0.900",
44
"private": true,
5-
"description": "An AppCheck package for new firebase packages",
5+
"description": "An App Check package for new firebase packages",
66
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
77
"main": "dist/index.cjs.js",
88
"browser": "dist/index.esm2017.js",
@@ -61,4 +61,4 @@
6161
"reportDir": "./coverage/node"
6262
},
6363
"esm5": "dist/index.esm.js"
64-
}
64+
}

packages-exp/app-check-exp/src/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const ERRORS: ErrorMap<AppCheckError> = {
3535
'initializeAppCheck() can only be called once.',
3636
[AppCheckError.USE_BEFORE_ACTIVATION]:
3737
'App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. ' +
38-
'Make sure you call initializeAppCheck() before instantiating other Firebase services.',
38+
'Call initializeAppCheck() before instantiating other Firebase services.',
3939
[AppCheckError.FETCH_NETWORK_ERROR]:
4040
'Fetch failed to connect to a network. Check Internet connection. ' +
4141
'Original error: {$originalErrorMessage}.',

packages-exp/app-check-exp/src/providers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { AppCheckProvider, AppCheckTokenInternal } from './types';
2929

3030
/**
3131
* App Check provider that can obtain a reCAPTCHA V3 token and exchange it
32-
* for an AppC heck token.
32+
* for an App Check token.
3333
*
3434
* @public
3535
*/

packages-exp/app-check-exp/src/storage.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export async function readTokenFromStorage(
3939
token = await readTokenFromIndexedDB(app);
4040
} catch (e) {
4141
// swallow the error and return undefined
42-
logger.warn(`Failed to read token from indexeddb. Error: ${e}`);
42+
logger.warn(`Failed to read token from IndexedDB. Error: ${e}`);
4343
}
4444
return token;
4545
}
@@ -85,11 +85,11 @@ export async function readOrCreateDebugTokenFromStorage(): Promise<string> {
8585
// If you see this error trying to use debug token, it probably means you are using a browser that doesn't support indexeddb.
8686
// You should switch to a different browser that supports indexeddb
8787
writeDebugTokenToIndexedDB(newToken).catch(e =>
88-
logger.warn(`Failed to persist debug token to indexeddb. Error: ${e}`)
88+
logger.warn(`Failed to persist debug token to IndexedDB. Error: ${e}`)
8989
);
9090
// Not using logger because I don't think we ever want this accidentally hidden?
9191
console.log(
92-
`App Check debug token: ${newToken}. You will need to whitelist it in the Firebase console for it to work`
92+
`App Check debug token: ${newToken}. You will need to add it to your app's App Check settings in the Firebase console for it to work`
9393
);
9494
return newToken;
9595
} else {

0 commit comments

Comments
 (0)