File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
packages/database/src/realtime Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @firebase/database ' : patch
3
+ ---
4
+
5
+ Fix sending of auth tokens on node.
Original file line number Diff line number Diff line change @@ -122,6 +122,8 @@ export class Connection {
122
122
this . repoInfo_ ,
123
123
this . applicationId_ ,
124
124
this . appCheckToken_ ,
125
+ this . authToken_ ,
126
+ null ,
125
127
this . lastSessionId
126
128
) ;
127
129
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ export class WebSocketConnection implements Transport {
172
172
// Note that this header is just used to bypass appcheck, and the token should still be sent
173
173
// through the websocket connection once it is established.
174
174
if ( this . authToken ) {
175
- options . headers [ 'Authorization' ] = this . authToken ;
175
+ options . headers [ 'Authorization' ] = `Bearer ${ this . authToken } ` ;
176
176
}
177
177
if ( this . appCheckToken ) {
178
178
options . headers [ 'X-Firebase-AppCheck' ] = this . appCheckToken ;
@@ -238,7 +238,7 @@ export class WebSocketConnection implements Transport {
238
238
/**
239
239
* No-op for websockets, we don't need to do anything once the connection is confirmed as open
240
240
*/
241
- start ( ) { }
241
+ start ( ) { }
242
242
243
243
static forceDisallow_ : boolean ;
244
244
You can’t perform that action at this time.
0 commit comments