Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
amj
Contributor II
Contributor II

How to use qlik-embed

Hello, I am trying to use qlik-embed but I can't find any example on how to use it with Cookie authentication.

I have an Angular 17+ application that is using Capabilities API (via require.js) that works against a self-hosted QlikSense server. There's a backend that authenticates against QlikSense and then returns the auth cookie which is used from the Angular app. In the scenario of qlik-embed I don't find any clue on how to proceed. Do you have any doc to follow? thanks.

Labels (2)
4 Replies
Clever_Anjos
Employee
Employee

You may find more information here Qlik Cloud Code Examples | Qlik Developer Portal 

Jeffrey_Goldberg
Employee
Employee

@amj , are you attempting to perform the auth against client-managed? Keep in mind qlik-embed support was introduced to client-managed with May 2024 release.

As for cookie auth, the constructor for client-managed is shown here: https://qlik.dev/embed/qlik-embed/authenticate/connect-qlik-embed/#connecting-to-qlik-sense-enterpri...

however, your mileage may vary depending on your virtual proxy / proxy configuration.

If you are on Qlik Cloud, I strongly suggest using OAuth2 single-page application. Yes it changes the auth profile a bit, but it's far easier to maintain and removes cookies from the equation.

 

CHeers,

 

Jeff G

amj
Contributor II
Contributor II
Author

Hello @Clever_Anjos and @Jeffrey_Goldberg , thanks for your answer. It is working after giving it a second try and fine-tuning the config, I needed to set the VP as well for data-host and properly configure Access-Control-Allow-Origin and
Access-Control-Allow-Credentials headers.

A question I have is that in our current solution (a mashup within an Angular app), a backend is doing the auth against QlikSense for us and then we are using a proxy to handle HTTPS & WSS traffic to QlikSense, by doing that we can keep our server privately and not exposing more than would be needed. The qlik-embed way of working needs data-host and data-login-uri to directly hit QlikSense server, is there any way of better protecting it?

Another topic I think of is about the WSS connection closing, right now with capabilities API we are able to decide when to close socket connection (quite useful for a mashup that allows opening and closing multiple apps), what would be the options to handle that with qlik-embed?

Thanks in advance for your help!

amj
Contributor II
Contributor II
Author

Another question would be about event handling, right now with capabilities API we are able to catch certain events like timeouts, how that could be handled now with qlik-embed?