Including sisense.js with <script> tag
Is it possible to use a script tag in index.html to include sisense.js?
The examples I see all dynamically load the script and inject it into the DOM.
We are building a React app and using SSO with JWT to authenticate the user when they login to our app. It appears that sisense.js needs the auth cookie to work because without it, I get 403 errors on sisense API calls to get_info, globalization, get_license and a few others.
-
Hi Brian,
I'm not sure what index.html file you are referring to - the HTML page for your application I assume.
Of course the Sisense.JS library can be consumed the standard way with a SCRIPT tag:
<script type="text/javascript" src="http://localhost/js/sisense.js"></script>
Please see the documentation for Sisense.JS where this example appears:
-
sisense.js will cause a redirect if the sisense auth cookie does not exist when it is requested. we have a single page app using react and SSO via JWT to sisense. to avoid this redirection, we are dynamically loading sisense.js after we get the sisense auth cookie. we do something similar to https://gitlab.com/SisenseJS/react-sample
-
How would one add a library to BloX? I have a node.js library called Shepherd.js that I would like to use while I'm using BloX. I've used "npm install Shepherd.js" to download the library into the BloX project but when ever I reference it I feel like I'm referencing the wrong path.
Please sign in to leave a comment.
Comments
4 comments