Added Reports Server Authorization to client side. IO-390

This commit is contained in:
Patrick Fic
2021-01-07 10:02:09 -08:00
parent 2d260dceb8
commit bf507821c0
2 changed files with 11 additions and 10 deletions

View File

@@ -19,8 +19,7 @@ const wsLink = new WebSocketLink({
lazy: true,
reconnect: true,
connectionParams: async () => {
const token =
auth.currentUser && (await auth.currentUser.getIdToken(true));
const token = auth.currentUser && (await auth.currentUser.getIdToken());
if (token) {
return {
headers: {
@@ -35,7 +34,7 @@ const wsLink = new WebSocketLink({
const subscriptionMiddleware = {
applyMiddleware: async (options, next) => {
options.authToken =
auth.currentUser && (await auth.currentUser.getIdToken(true));
auth.currentUser && (await auth.currentUser.getIdToken());
next();
},
};