10 Replies
Can you post the code snippet where you are calling the init function and getting the token here? Also a HAR file would be helpful
init({
thoughtSpotHost: "https://vizio.thoughtspot.cloud",
authType: AuthType.TrustedAuthToken,
username: "selfserve_app",
getAuthToken: () => {
return fetch("https://vizio.thoughtspot.cloud/api/rest/2.0/auth/token/full",
{
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify(
{
username: "xxx",
validity_time_in_sec: 300,
auto_create: false,
secret_key:
${thoughtspotKey}
})
}
)
.then(response => response.json())
.then(data => data.token);
}
});
@shikharTS ^^@shikharTS shared HAR here ^^
@shikharTS Do you need anything else from me? This is pretty high priority for us.
From the HAR it says
This is the payload going to TS
@shikharTS how to fix it? what needs to be passed?
You are sending [object Object] looks like a coding error..
oh yeah. That we are providing as part of the request.
not sure why it is invalidating others request but not mine.
@shikharTS FYI the application has been deployed in AWS ECS
even in my local machine, in 1st browser it is working fine but then in the secondary browser, it says not logged in.
So for secondary browser do you have cookies disabled? Since you are using TrustedAuth, you will need to enable 3rd party cookies. If you don't want to do that, you can use TrustedAuthCookieless. But you will need to figure out why the api load is sending [object Object] for auth token call..