Skip to content

Commit 6435cd4

Browse files
fix m2m token
1 parent f02f334 commit 6435cd4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

config/webpack/default.js

+7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// eslint-disable-next-line import/no-extraneous-dependencies
2+
const webpack = require('webpack');
3+
24
module.exports = {
35
node: {
46
tls: 'empty',
@@ -23,5 +25,10 @@ module.exports = {
2325
'tc-accounts',
2426
'to-capital-case',
2527
'topcoder-react-utils',
28+
'tc-core-library-js',
29+
],
30+
plugins: [
31+
// eslint-disable-next-line global-require
32+
new webpack.DefinePlugin({ CONFIG: JSON.stringify(require('config')) }),
2633
],
2734
};

src/services/api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515

1616
const { m2m: m2mAuth } = auth;
1717

18-
const m2m = m2mAuth(_.pick(config.SECRET.TC_M2M, ['AUTH0_URL', 'AUTH0_AUDIENCE', 'TOKEN_CACHE_TIME', 'AUTH0_PROXY_SERVER_URL']));
18+
const m2m = m2mAuth(_.pick(config.AUTH_CONFIG, ['AUTH0_URL', 'AUTH0_AUDIENCE', 'TOKEN_CACHE_TIME', 'AUTH0_PROXY_SERVER_URL']));
1919

2020
/* The minimal delay [ms] between API calls. To avoid problems with the requests
2121
* rate limits configured in Topcoder APIs, we throttle requests rate at the

0 commit comments

Comments
 (0)