From 2586855f111553ae153d6e1116be7a69d0321bf7 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Thu, 4 May 2023 13:33:16 -0700 Subject: [PATCH] Add firebase auth to JSR call. --- client/src/utils/RenderTemplate.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/utils/RenderTemplate.js b/client/src/utils/RenderTemplate.js index f8b837817..f103111cf 100644 --- a/client/src/utils/RenderTemplate.js +++ b/client/src/utils/RenderTemplate.js @@ -3,7 +3,7 @@ import { notification } from "antd"; import jsreport from "@jsreport/browser-client"; import _ from "lodash"; import moment from "moment"; -//import { auth } from "../firebase/firebase.utils"; +import { auth } from "../firebase/firebase.utils"; import { setEmailOptions } from "../redux/email/email.actions"; import { store } from "../redux/store"; import client from "../utils/GraphQLClient"; @@ -309,8 +309,8 @@ export const GenerateDocuments = async (templates) => { const fetchContextData = async (templateObject, jsrAuth) => { const bodyshop = store.getState().user.bodyshop; - // jsreport.headers["Authorization"] = - // "Bearer " + (await auth.currentUser.getIdToken()); + jsreport.headers["FirebaseAuthorization"] = + "Bearer " + (await auth.currentUser.getIdToken()); const folders = await cleanAxios.get(`${server}/odata/folders`, { headers: { Authorization: jsrAuth },