You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: superset-embedded-sdk/README.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,11 @@ using your app's authentication.
27
27
28
28
Embedding is done by inserting an iframe, containing a Superset page, into the host application.
29
29
30
+
## Prerequisites
31
+
32
+
* Activate the feature flag `EMBEDDED_SUPERSET`
33
+
* Set a strong password in configuration variable `GUEST_TOKEN_JWT_SECRET` (see configuration file config.py). Be aware that its default value must be changed in production.
34
+
30
35
## Embedding a Dashboard
31
36
32
37
Using npm:
@@ -108,6 +113,30 @@ Example `POST /security/guest_token` payload:
108
113
]
109
114
}
110
115
```
116
+
117
+
Alternatively, a guest token can be created directly in your app with a json like the following, and then signed
118
+
with the secret set in configuration variable `GUEST_TOKEN_JWT_SECRET` (see configuration file config.py)
119
+
```
120
+
{
121
+
"user": {
122
+
"username": "embedded@embedded.fr",
123
+
"first_name": "embedded",
124
+
"last_name": "embedded"
125
+
},
126
+
"resources": [
127
+
{
128
+
"type": "dashboard",
129
+
"id": "d73e7841-9342-4afd-8e29-b4a416a2498c"
130
+
}
131
+
],
132
+
"rls_rules": [],
133
+
"iat": 1730883214,
134
+
"exp": 1732956814,
135
+
"aud": "superset",
136
+
"type": "guest"
137
+
}
138
+
```
139
+
111
140
### Sandbox iframe
112
141
113
142
The Embedded SDK creates an iframe with [sandbox](https://developer.mozilla.org/es/docs/Web/HTML/Element/iframe#sandbox) mode by default
0 commit comments