Skip to content

Commit

Permalink
Update getAccessToken to use BASE_URL host
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelle committed Sep 17, 2024
1 parent 7036945 commit d54ce63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/apiUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async function getAccessToken(firmId, authCode) {
const grantType = "authorization_code";
let requestDetails = {
method: "POST",
url: `https://api.getsilverfin.com/f/${firmId}/oauth/token?client_id=${process.env.SF_API_CLIENT_ID}&client_secret=${process.env.SF_API_SECRET}&redirect_uri=${redirectUri}&grant_type=${grantType}&code=${authCode}`,
url: `https://${BASE_URL}/f/${firmId}/oauth/token?client_id=${process.env.SF_API_CLIENT_ID}&client_secret=${process.env.SF_API_SECRET}&redirect_uri=${redirectUri}&grant_type=${grantType}&code=${authCode}`,
};
const response = await axios(requestDetails);
firmCredentials.storeNewTokenPair(firmId, response.data);
Expand Down

0 comments on commit d54ce63

Please sign in to comment.