<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Embedded analytics using iframe only is broken if not logged in in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Embedded-analytics-using-iframe-only-is-broken-if-not-logged-in/m-p/1823914#M15296</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145697"&gt;@homer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error message suggest that you're trying to load login.qlik.com inside the iFrame which is not possible.&lt;/P&gt;
&lt;P&gt;It needs to be loaded OUTSIDE the iFrame, only the Qlik Sense app/objects should be loaded inside the iFrame.&lt;/P&gt;
&lt;P&gt;There is an example here:&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/Knowledge-Base/Qlik-Sense-Enterprise-SaaS-How-to-embed-a-chart-in-an-iFrame/ta-p/1711503" target="_blank"&gt;https://community.qlik.com/t5/Knowledge-Base/Qlik-Sense-Enterprise-SaaS-How-to-embed-a-chart-in-an-iFrame/ta-p/1711503&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jul 2021 13:53:03 GMT</pubDate>
    <dc:creator>Damien_V</dc:creator>
    <dc:date>2021-07-22T13:53:03Z</dc:date>
    <item>
      <title>Embedded analytics using iframe only is broken if not logged in</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Embedded-analytics-using-iframe-only-is-broken-if-not-logged-in/m-p/1822196#M15242</link>
      <description>&lt;P&gt;&lt;SPAN class="css-901oao css-16my406 r-poiln3 r-bcqeeo r-qvutc0"&gt;I'm trying to do embedded analytics and have successfully followed these instructions to load an iframe &lt;/SPAN&gt;&lt;A href="https://support.qlik.com/articles/000096877" target="_blank" rel="noopener noreferrer"&gt;https://support.qlik.com/articles/000096877&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="css-901oao css-16my406 r-poiln3 r-bcqeeo r-qvutc0"&gt;If I'm not logged in however, then the iframe redirects to &lt;/SPAN&gt;&lt;A href="https://login.qlik.com" target="_blank" rel="noopener noreferrer"&gt;&lt;SPAN class="css-901oao css-16my406 r-poiln3 r-hiw28u r-qvk6io r-bcqeeo r-qvutc0"&gt;https://&lt;/SPAN&gt;login.qlik.com&lt;/A&gt;&lt;SPAN class="css-901oao css-16my406 r-poiln3 r-bcqeeo r-qvutc0"&gt; which refuses to load because of CSP. What's the fix?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="css-901oao css-16my406 r-poiln3 r-bcqeeo r-qvutc0"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="E6NQZBOX0AYCOok.png" style="width: 760px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/58593i7B34BD9E0462CCB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="E6NQZBOX0AYCOok.png" alt="E6NQZBOX0AYCOok.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 20:08:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Embedded-analytics-using-iframe-only-is-broken-if-not-logged-in/m-p/1822196#M15242</guid>
      <dc:creator>homer</dc:creator>
      <dc:date>2021-07-14T20:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Embedded analytics using iframe only is broken if not logged in</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Embedded-analytics-using-iframe-only-is-broken-if-not-logged-in/m-p/1823135#M15278</link>
      <description>&lt;P&gt;Anyone?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 16:13:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Embedded-analytics-using-iframe-only-is-broken-if-not-logged-in/m-p/1823135#M15278</guid>
      <dc:creator>homer</dc:creator>
      <dc:date>2021-07-19T16:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Embedded analytics using iframe only is broken if not logged in</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Embedded-analytics-using-iframe-only-is-broken-if-not-logged-in/m-p/1823911#M15294</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145697"&gt;@homer&lt;/a&gt;&amp;nbsp;, can you please check if this apply to your scenario?&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Integration-Extension-APIs/Refuse-to-display-iFrame-due-to-frame-ancestor/td-p/1683350" target="_blank"&gt;https://community.qlik.com/t5/Integration-Extension-APIs/Refuse-to-display-iFrame-due-to-frame-ancestor/td-p/1683350&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 13:46:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Embedded-analytics-using-iframe-only-is-broken-if-not-logged-in/m-p/1823911#M15294</guid>
      <dc:creator>Daniele_Purrone</dc:creator>
      <dc:date>2021-07-22T13:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Embedded analytics using iframe only is broken if not logged in</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Embedded-analytics-using-iframe-only-is-broken-if-not-logged-in/m-p/1823914#M15296</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145697"&gt;@homer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error message suggest that you're trying to load login.qlik.com inside the iFrame which is not possible.&lt;/P&gt;
&lt;P&gt;It needs to be loaded OUTSIDE the iFrame, only the Qlik Sense app/objects should be loaded inside the iFrame.&lt;/P&gt;
&lt;P&gt;There is an example here:&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/Knowledge-Base/Qlik-Sense-Enterprise-SaaS-How-to-embed-a-chart-in-an-iFrame/ta-p/1711503" target="_blank"&gt;https://community.qlik.com/t5/Knowledge-Base/Qlik-Sense-Enterprise-SaaS-How-to-embed-a-chart-in-an-iFrame/ta-p/1711503&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 13:53:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Embedded-analytics-using-iframe-only-is-broken-if-not-logged-in/m-p/1823914#M15296</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2021-07-22T13:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Embedded analytics using iframe only is broken if not logged in</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Embedded-analytics-using-iframe-only-is-broken-if-not-logged-in/m-p/1823942#M15297</link>
      <description>&lt;P&gt;Hello, no thats not the case.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When already logged in, the embed iframe works - I've already added the frame ancestors CSP. The trouble is that when not logged in, the embed itself redirects to the login.qlik.com domain inside the iframe, thereby breaking the CSP of that domain and then failing to load *anything* in the iframe.&lt;/P&gt;&lt;P&gt;The behaviour I would expect is that the embed says that you need to login, and then you'd have to click on a button to login, which would open login.qlik.com in a popup, then reload the iframe on successful login. Instead I just get a broken iframe.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 15:13:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Embedded-analytics-using-iframe-only-is-broken-if-not-logged-in/m-p/1823942#M15297</guid>
      <dc:creator>homer</dc:creator>
      <dc:date>2021-07-22T15:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Embedded analytics using iframe only is broken if not logged in</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Embedded-analytics-using-iframe-only-is-broken-if-not-logged-in/m-p/1823947#M15298</link>
      <description>&lt;P&gt;Thanks for the link. I'm getting closer now. I can see how that would work for other use cases, but my scenario in more complex.&lt;/P&gt;&lt;P&gt;My app (app A) on domain A is actually in an iframe itself (in app B on domain B).&lt;/P&gt;&lt;P&gt;I have already added iframe ancestors CSP for domains A &amp;amp; B, so when logged in, all is good. The iframe embed loads.&lt;/P&gt;&lt;P&gt;Now, if I was to follow the example you give, which is good in some scenarios, then the login screen would replace app A in the iframe, but still fall foul of the CSP on say login.qlik.com, or whatever other login provider.&lt;/P&gt;&lt;P&gt;My expectation for login would be as I explained to&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/42559"&gt;@Daniele_Purrone&lt;/a&gt; :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;gt; The behaviour I would expect is that the embed says that you need to login,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; and then you'd have to click on a button to login, which would open login.qlik.com&lt;BR /&gt;&amp;gt; in a popup, then reload the iframe on successful login.&lt;BR /&gt;&amp;gt; Instead I just get a broken iframe.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 15:26:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Embedded-analytics-using-iframe-only-is-broken-if-not-logged-in/m-p/1823947#M15298</guid>
      <dc:creator>homer</dc:creator>
      <dc:date>2021-07-22T15:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Embedded analytics using iframe only is broken if not logged in</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Embedded-analytics-using-iframe-only-is-broken-if-not-logged-in/m-p/1824145#M15301</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145697"&gt;@homer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want that kind of behavior, you will have to code it on your page, that is not something that happens out of the box in Qlik Sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a very simplistic example:&lt;/P&gt;
&lt;P&gt;Parent page:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;

&amp;lt;head&amp;gt;
  &amp;lt;meta charset="UTF-8"&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
  &amp;lt;meta http-equiv="X-UA-Compatible" content="ie=edge"&amp;gt;
  &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body style="height:600px;"&amp;gt;
&amp;lt;iframe src="childpage.html" style="border:none;width:100%;height:100%;"&amp;gt;&amp;lt;/iframe&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Child page:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;

&amp;lt;head&amp;gt;
  &amp;lt;meta charset="UTF-8"&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
  &amp;lt;meta http-equiv="X-UA-Compatible" content="ie=edge"&amp;gt;
  &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
  &amp;lt;script type="text/javascript"&amp;gt;
    const webIntegrationId = "TbFuSrrd-AljEFjqqyBCHXzWLYiY4xEh";
    function login() {
      function isLoggedIn() {
        return fetch("https://yourtenant.eu.qlikcloud.com/api/v1/users/me", {
          method: 'GET',
          mode: 'cors',
          credentials: 'include',
          headers: {
            'Content-Type': 'application/json',
            'qlik-web-integration-id': webIntegrationId,
          },
        }).then(response =&amp;gt; {
          return response.status === 200;
        });
      }
      return isLoggedIn().then(loggedIn =&amp;gt; {
        if (!loggedIn) {
          // check login
          window.top.location.href = "https://yourtenant.eu.qlikcloud.com/login?qlik-web-integration-id=" + webIntegrationId + "&amp;amp;returnto=" + top.location.href;  
          document.body.innerHTML = document.body.innerHTML + "&amp;lt;div&amp;gt;Please log in to https://yourtenant.eu.qlikcloud.com before accessing this page.&amp;lt;/div&amp;gt;";          
        }else{
            window.location.href = "https://yourtenant.eu.qlikcloud.com/single/?appid=8120d03d-3902-4f4e-b0f1-3fee539227ad&amp;amp;obj=DKnjQAk&amp;amp;opt=ctxmenu,currsel" ;
        }
      });
    }
	login()
  &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body style="height:600px;"&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 15:10:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Embedded-analytics-using-iframe-only-is-broken-if-not-logged-in/m-p/1824145#M15301</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2021-07-23T15:10:37Z</dc:date>
    </item>
  </channel>
</rss>

