Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
fix: pass auth header in connection params in websocket link
Browse files Browse the repository at this point in the history
  • Loading branch information
Dara Hayes authored and wtrocki committed May 13, 2019
1 parent 38d6d2a commit 69ced62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sync/src/links/WebsocketLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const defaultWebSocketLink = (userOptions: DataSyncConfig, config: WebSoc
// Params that can be used to send authentication token etc.
connectionParams: async () => {
if (userOptions.authContextProvider) {
const { token } = await userOptions.authContextProvider();
return token;
const { header } = await userOptions.authContextProvider();
return { Authorization: header };
}
},
connectionCallback: options.connectionCallback,
Expand Down

0 comments on commit 69ced62

Please sign in to comment.