Can't authenticate to get guest_token #32233
Replies: 2 comments 5 replies
-
To resolve the issue of receiving an HTML login page instead of a guest token, ensure the following steps are correctly implemented:
Example payload for requesting a guest token: {
"user": {
"username": "embed_user",
"first_name": "embed",
"last_name": "user"
},
"resources": [{
"type": "dashboard",
"id": "522b4480-cf6b-45f8-a361-97f27f929137"
}],
"rls": [
{ "clause": "" }
]
}
Example frontend code: import { embedDashboard } from "@superset-ui/embedded-sdk";
embedDashboard({
id: "522b4480-cf6b-45f8-a361-97f27f929137",
supersetDomain: "http://localhost:8088",
mountPoint: document.getElementById("superset-container"),
fetchGuestToken: () => dt.data['token'],
dashboardUiConfig: {
filters: {
expanded: true,
},
urlParams: {
standalone: 3,
}
}
});
By ensuring these configurations and steps are correctly followed, you should be able to receive a guest token instead of an HTML login page. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other | Bug Report |
Beta Was this translation helpful? Give feedback.
-
After doing all those steps, i still get the same result, nothing has changed, i still have the login page html as an answer instead of the token. Can it maybe have something to do with a version of superset or something similar? |
Beta Was this translation helpful? Give feedback.
-
I'm trying to get a guest_token, but it seems like my authentication token i get prior has already expired by the time i try to get the guest_token to embed a dashboard in a react page.
Here is my code:
With this, when trying to get the guest_token, i get back a html instead of said token. This html is the login site. @dosubot any ideas?
Beta Was this translation helpful? Give feedback.
All reactions