You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "Lau08 (via GitHub)" <gi...@apache.org> on 2025/08/07 14:24:26 UTC

Re: [D] What am I missing while trying to embed a dashboard? [superset]

GitHub user Lau08 added a comment to the discussion: What am I missing while trying to embed a dashboard?

This config worked for me:

```
FEATURE_FLAGS = { "ALERT_REPORTS": True, "EMBEDDED_SUPERSET": True }
 
GUEST_ROLE_NAME = "Gamma"
GUEST_TOKEN_JWT_SECRET = "your-secret-here"
GUEST_TOKEN_JWT_AUDIENCE = "audi"
 
TALISMAN_ENABLED = False
 
OVERRIDE_HTTP_HEADERS = {
    "X-Frame-Options": "ALLOWALL",
    "Content-Security-Policy": "frame-ancestors 'self' http://localhost:5173"
}
ENABLE_CORS = True
```

And in the dashboard to embed in superset, copy the URL like this: http://localhost:5173 with the http://

<img width="601" height="351" alt="image" src="https://github.com/user-attachments/assets/e0532394-8ae7-4475-8ef5-023755d718e3" />

This worked using a guest token, payload to get it from the Svelte application in my case, and using the SDK:
```
const payload = {
		user: {
			first_name: 'Embedded first_name',
			last_name: 'Embedded last_name',
			username: 'Embedded_user'
		},
		resources: [
			{
				id: SUPERSET_DASHBOARD_ID, //your dashboard id
				type: 'dashboard'
			}
		],
		rls_rules: [],
		aud: "audi", // same as GUEST_TOKEN_JWT_AUDIENCE in superset
		type: 'guest'
	};

const token = encodeJwt(payload, SUPERSET_GUEST_SECRET);
```


GitHub link: https://github.com/apache/superset/discussions/18814#discussioncomment-14035684

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org