File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
packages/database/src/realtime Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -166,10 +166,16 @@ export class WebSocketConnection implements Transport {
166
166
}
167
167
} ;
168
168
169
- // Adding a comment to ask questions
169
+ // If using Node with admin creds, AppCheck-related checks are unnecessary.
170
+ // It will send the authorization token.
170
171
if ( this . nodeAdmin ) {
171
172
options . headers [ 'Authorization' ] = this . authToken || '' ;
172
173
} else {
174
+ // If using Node without admin creds (which includes all uses of the
175
+ // client-side Node SDK), it will send an AppCheck token if available.
176
+ // Any other auth credentials will eventually be sent after the connection
177
+ // is established, but aren't needed here as they don't effect the initial
178
+ // request to establish a connection.
173
179
options . headers [ 'X-Firebase-AppCheck' ] = this . appCheckToken || '' ;
174
180
}
175
181
You can’t perform that action at this time.
0 commit comments