Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Backend auth flow:
User logs into our app via Keycloak (OIDC) using next-auth.
Backend sends Keycloak token to our API.
We call https://<tenant>.qlikcloud.com/login/jwt-session with:
Authorization: Bearer <our custom JWT>
qlik-web-integration-id
credentials: "include"
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>
);
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.
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.
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!
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.
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?
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.