Lau08 commented on issue #22258:
URL: https://github.com/apache/superset/issues/22258#issuecomment-3164408036

   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/e0ad9315-cbe8-448e-b730-e4d98d5fff29";
 />
   
   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);
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to