Skip to content

Commit

Permalink
Remporary rewaccesstokenFix.
Browse files Browse the repository at this point in the history
  • Loading branch information
pratikpatel351 committed Apr 29, 2021
1 parent cf516fb commit 2f895e2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions express/api_routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function setupProxyRoutes() {
let fdkHelper = FdkHelper.getInstance(req.fdkSession.cluster, extension);
let platformConfig = await fdkHelper.getPlatformConfigInstance(req.fdkSession.company_id);
platformConfig.oauthClient.setToken(req.fdkSession);
await platformConfig.oauthClient.renewAccessToken();
const client = new PlatformClient(platformConfig);
req.platformClient = client;
req.extension = extension;
Expand Down
1 change: 1 addition & 0 deletions express/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function setupFdk(data) {
});
let session = await SessionStorage.getSession(sid);
platformConfig.oauthClient.setToken(session);
await platformConfig.oauthClient.renewAccessToken();
client = new PlatformClient(platformConfig);
}
return client;
Expand Down
1 change: 1 addition & 0 deletions express/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ function setupRoutes(ext) {
});
let session = await SessionStorage.getSession(sid);
platformConfig.oauthClient.setToken(session);
await platformConfig.oauthClient.renewAccessToken();
const client = new PlatformClient(platformConfig);
req.platformClient = client;
}
Expand Down

0 comments on commit 2f895e2

Please sign in to comment.