Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 263a659

Browse files
committed
Fixed an issue with env variables not being properly configured.
1 parent 43acfdf commit 263a659

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/services/interviews.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import { axiosInstance as axios } from "./requestInterceptor";
44
import config from "../../config";
55
import jwt from "jsonwebtoken";
6+
const connectCalendarJWTSecret = process.env.NYLAS_CONNECT_CALENDAR_JWT_SECRET;
7+
const nylasClientId = process.env.NYLAS_CLIENT_ID;
68

79
export const getUserSettings = (userId) => {
810
return axios.get(`${config.API.V5}/taas/user-meeting-settings/${userId}`);
@@ -32,14 +34,14 @@ export const connectCalendar = (userId, appRedirectUrl) => {
3234
userId,
3335
redirectTo: appRedirectUrl,
3436
},
35-
process.env.NYLAS_CONNECT_CALENDAR_JWT_SECRET,
37+
connectCalendarJWTSecret,
3638
{
3739
algorithm: "HS256",
3840
expiresIn: 60,
3941
}
4042
);
4143

42-
const nylasCalendarConnectionUrl = `https://api.nylas.com/oauth/authorize?client_id=${process.env.NYLAS_CLIENT_ID}&redirect_uri=${apiRedirectUrl}&response_type=code&scopes=calendar&state=${state}`;
44+
const nylasCalendarConnectionUrl = `https://api.nylas.com/oauth/authorize?client_id=${nylasClientId}&redirect_uri=${apiRedirectUrl}&response_type=code&scopes=calendar&state=${state}`;
4345

4446
return (window.location.href = nylasCalendarConnectionUrl);
4547
};

webpack.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ module.exports = (webpackConfigEnv) => {
8181
"process.env": {
8282
APPENV: JSON.stringify(process.env.APPENV),
8383
STRIPE_PUBLIC_KEY: JSON.stringify(process.env.STRIPE_PUBLIC_KEY),
84+
NYLAS_CLIENT_ID: JSON.stringify(process.env.NYLAS_CLIENT_ID),
85+
NYLAS_CONNECT_CALENDAR_JWT_SECRET: JSON.stringify(process.env.NYLAS_CONNECT_CALENDAR_JWT_SECRET)
8486
},
8587
}),
8688
],

0 commit comments

Comments
 (0)