Skip to content

Commit 94dd78e

Browse files
committed
Address PR comments
1 parent c6c1c4c commit 94dd78e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

packages/database/exp/register.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ export function registerDatabase(variant?: string): void {
3838
(container, { instanceIdentifier: url }) => {
3939
const app = container.getProvider('app-exp').getImmediate()!;
4040
const authProvider = container.getProvider('auth-internal');
41-
// App check is unsupported in Node.
42-
const appCheckProvider =
43-
variant === 'node'
44-
? undefined
45-
: container.getProvider('app-check-internal');
41+
const appCheckProvider = container.getProvider('app-check-internal');
4642
return repoManagerDatabaseFromApp(
4743
app,
4844
authProvider,

packages/storage/src/implementation/requests.ts

+2
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ export function sharedErrorHandler(
106106
let newErr;
107107
if (xhr.getStatus() === 401) {
108108
if (
109+
// This exact message string is the only consistent part of the
110+
// server's error response that identifies it as an App Check error.
109111
xhr.getResponseText().includes('Firebase App Check token is invalid')
110112
) {
111113
newErr = unauthorizedApp();

0 commit comments

Comments
 (0)