/qlik-embed-auto-objects

An OAuth M2M impersonation demo which also showcases the qlik-embed UI types

Primary LanguageHTMLMIT LicenseMIT

qlik-embed-auto-objects

This app connects to a single Qlik Sense app, and generates several embedded objects for each object in the app. This also demos OAuth Machine-to-Machine impersonation to support custom login providers and portals.

To login, enter any email address. A new user will be created in your tenant for that email address, if one doesn't already exist.

For each object in the specified Qlik Sense app, this app will generates:

  • classic/app: the legacy whole-sheet embed, which provides good support for the native Qlik Sense experience
  • analytics/sheet: the more modern, nebula sheet embed, which provides little of the native experience but is more performant and customizable than classic/app
  • classic/chart: the legacy chart object embed, similar to classic/app
  • analytics/chart: the more modern, nebula chart embed, similar to analytics/sheet

Considerations for production usage

You should not use this example as-is. Before deploying:

Configuration

To configure this against your tenant:

  1. Create an OAuth client in your tenant with the following properties:
  • Client type: Web
  • Scopes: user_default and admin_classic
  • Allowed origins: path to your web app
  • Allow Machine-to-Machine (M2M): checked
  • Allow M2M user impersonation" checked
  • Once the client is created, change the consent method to trusted
  1. Add the relevant secrets to the app env file, or to "Secrets" if using Replit:
  • clientId: the OAuth client ID for the client created in step 1
  • clientSecret: the OAuth client secret for the client created in step 1
  • host: the URL to the Qlik Cloud tenant hosting your app and OAuth client. In the format https://tenant.us.qlikcloud.com
  • appId: the ID of the source Qlik Sense app

Once you run the app, you will be prompted to enter an email address. Once submitted, the user will be returned (after being created if it doesn't yet exist), and you will be redirected to the home page. This page will display all of the objects in your app, multiple times per the object type definitions above.