We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4264829 commit 6da4711Copy full SHA for 6da4711
backend/companion/getKcpToken.js
@@ -3,10 +3,10 @@ export async function getKcpToken() {
3
const grantType = 'client_credentials';
4
const clientId =
5
process.env.COMPANION_KCP_AUTH_CLIENT_SECRET ??
6
- (await import('./credentials.js')).credentials.clientId;
+ (await import('./credentials.js'))?.credentials?.clientId;
7
const clientSecret =
8
process.env.COMPANION_KCP_AUTH_CLIENT_ID ??
9
- (await import('./credentials.js')).credentials.clientSecret;
+ (await import('./credentials.js'))?.credentials?.clientSecret;
10
11
if (!clientId) {
12
throw new Error('COMPANION_KCP_AUTH_CLIENT_ID is not set');
0 commit comments