We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c6d005e + eac744d commit 0c24941Copy full SHA for 0c24941
src/client/RequestClient.ts
@@ -99,6 +99,15 @@ export class RequestClient {
99
request.headers["Authorization"] = "Bearer " + (token.hasOwnProperty("accessToken") ? (token as AccessToken).accessToken : token);
100
}
101
102
+ if (Utility.isRunningWithinPortals()) {
103
+ try {
104
+ const token = await (window as any).shell.getTokenDeferred();
105
+ request.headers["__RequestVerificationToken"] = token;
106
+ } catch (error) {
107
+ throw new Error("Unable to fetch token from shell. Error: " + (error as Error)?.message);
108
+ }
109
110
+
111
const url = request.apiConfig ? request.apiConfig.url : config.dataApi.url;
112
113
return await executeRequest({
0 commit comments