fixed#541
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the preauth cache success trigger in ts-embed.ts to pass an empty object instead of the data payload. The reviewer pointed out that passing an empty object {} breaks the preauth cache functionality because the embedded application relies on the session information (such as data.info). They suggested sanitizing the payload and passing { info: data.info } instead.
| getPreauthInfo().then((data) => { | ||
| if (data?.info) { | ||
| this.trigger(HostEvent.InfoSuccess, data); | ||
| this.trigger(HostEvent.InfoSuccess, {}); |
There was a problem hiding this comment.
Passing an empty object {} as the payload for HostEvent.InfoSuccess will prevent the embedded ThoughtSpot application from receiving the preauth session information (such as data.info). This breaks the preauth cache functionality, as the embedded app relies on this data to populate its cache.
If the intention was to avoid exposing sensitive headers or other properties in data, you should sanitize the payload and send only the necessary fields (e.g., { info: data.info }) instead of an empty object.
| this.trigger(HostEvent.InfoSuccess, {}); | |
| this.trigger(HostEvent.InfoSuccess, { info: data.info }); |
commit: |
No description provided.