fix: address feedback and correct client secret env var to new variable for connection methods

This commit is contained in:
Scott Wilson
2025-09-22 10:26:20 -07:00
parent 2786d49cad
commit d5c39a5c56
3 changed files with 9 additions and 6 deletions
@@ -40,12 +40,12 @@ export const refreshHerokuToken = async (
appConnectionDAL: Pick<TAppConnectionDALFactory, "updateById">,
kmsService: Pick<TKmsServiceFactory, "createCipherPairWithDataKey">
): Promise<string> => {
const { CLIENT_SECRET_HEROKU } = getConfig();
const { INF_APP_CONNECTION_HEROKU_OAUTH_CLIENT_SECRET } = getConfig();
const payload = {
grant_type: "refresh_token",
refresh_token: refreshToken,
client_secret: CLIENT_SECRET_HEROKU
client_secret: INF_APP_CONNECTION_HEROKU_OAUTH_CLIENT_SECRET
};
const { data } = await request.post<{ access_token: string; expires_in: number }>(
@@ -75,7 +75,7 @@ export const refreshHerokuToken = async (
};
export const exchangeHerokuOAuthCode = async (code: string): Promise<HerokuOAuthTokenResponse> => {
const { CLIENT_SECRET_HEROKU } = getConfig();
const { INF_APP_CONNECTION_HEROKU_OAUTH_CLIENT_SECRET } = getConfig();
try {
const response = await request.post<HerokuOAuthTokenResponse>(
@@ -83,7 +83,7 @@ export const exchangeHerokuOAuthCode = async (code: string): Promise<HerokuOAuth
{
grant_type: "authorization_code",
code,
client_secret: CLIENT_SECRET_HEROKU
client_secret: INF_APP_CONNECTION_HEROKU_OAUTH_CLIENT_SECRET
},
{
headers: {