Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
VladGordeyko
Contributor II
Contributor II

Delay in Qlik Embed(@qlik/embed-react) After JWT Cookie Auth — “No Permission to Open App” for 2 Minutes

 

Hi Qlik Community,

We're integrating Qlik Embed (@qlik/embed-react) into a Next.js application (React + TypeScript) using cookie-based JWT session authentication. Everything works, but we’re consistently experiencing a 2-minute delay after session initialization before Qlik objects become accessible.


Setup:

  • Backend auth flow:

    1. User logs into our app via Keycloak (OIDC) using next-auth.

    2. Backend sends Keycloak token to our API.

    3. We call https://<tenant>.qlikcloud.com/login/jwt-session with:

      • Authorization: Bearer <our custom JWT>

      • qlik-web-integration-id

      • credentials: "include"

    4. Then call https://<tenant>.qlikcloud.com/api/v1/users/me to validate.

  • Frontend setup:

     
    const hostConfig = {
      host: "https://<tenant>.qlikcloud.com",
      authType: "cookie",
      webIntegrationId: "WEBID",
    };
    
    return (
      <QlikEmbedConfig.Provider value={hostConfig}>
    // Custom build Qlik Layout using the QlikEmbed Components from @qlik/embed-react <QlikLayout appId="APPID" /> </QlikEmbedConfig.Provider> );

The issue:

Immediately after cookie is set, the embed component fails with:

Fatal error for embedded ui analytics/selections:
Failed to open app APPID on https://<tenant>.qlikcloud.com: No permission to open the app
  •  No 400 errors in Qlik API calls.

  • After exactly 2 minutes, everything starts working normally and Qlik loads fine.


 What We've Verified:

  •  The JWT’s nbf is set 30 seconds earlier than iat.

  • Cookies are set correctly (SameSite=None; Secure, etc.).

  • The /users/me call confirms the user immediately after jwt-session.

Questions:

  • Is this delay a known side-effect of cookie-based JWT login in Qlik Cloud?

  • Is there a background delay in Qlik session activation after /jwt-session?

  • Are we missing a final handshake to make the session active immediately?

We want users to load Qlik content instantly after login, without waiting or seeing errors.

Thanks in advance for any insight!

Labels (3)
1 Solution

Accepted Solutions
VladGordeyko
Contributor II
Contributor II
Author

Hi @Dave_Channon thanks for your answer. The user should have the access to the space before call. Not sure what happened there, but we resolved the delay issue using the oauth2 with getAccessToken function calling Backend to Backend to /oauth/token.

Thanks again.

View solution in original post

2 Replies
Dave_Channon
Employee
Employee

Hi @VladGordeyko, it doesn't feel like something our side, but I don't have a react app to try it with. I would expect zero delay prior to having access, unless the user had previously requested the app before they were added to the relevant space or app share. Are you apply the app access on login or does the user already have access to the space/ app share before they log in?

VladGordeyko
Contributor II
Contributor II
Author

Hi @Dave_Channon thanks for your answer. The user should have the access to the space before call. Not sure what happened there, but we resolved the delay issue using the oauth2 with getAccessToken function calling Backend to Backend to /oauth/token.

Thanks again.