Skip to content

Commit fc502b9

Browse files
authored
Merge pull request #7135 from topcoder-platform/auth0_updates
Auth0 updates to avoid v3jwt usage
2 parents 8aace15 + 1701e0f commit fc502b9

File tree

4 files changed

+15
-25
lines changed

4 files changed

+15
-25
lines changed

__tests__/shared/components/__snapshots__/Content.jsx.snap

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,17 @@ exports[`Matches shallow shapshot 1`] = `
8181
<code>
8282
topcoder-react-lib/src/services/api.js
8383
</code>
84-
), with support of TC authentication (look for auth tokens either in
85-
<code>
86-
store.auth
87-
</code>
88-
89-
of Redux store, or in
90-
<code>
91-
v3jwt
92-
</code>
93-
94-
and
95-
<code>
96-
tcjwt
97-
</code>
98-
99-
cookies of the front-end requests to the server);
84+
), with support of TC authentication (look for auth tokens either in
85+
<code>
86+
store.auth
87+
</code>
88+
89+
of Redux store, or in the
90+
<code>
91+
tcjwt
92+
</code>
93+
94+
cookie of the front-end requests to the server);
10095
</li>
10196
<li>
10297
Stylefmt;

__tests__/shared/reducers/challenge.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ describe('Factory with server-side rendering', () => {
315315
reducers.factory({
316316
cookies: {
317317
tcjwt: 'TcAuthTokenV2',
318-
v3jwt: 'TcAuthTokenV3',
319318
},
320319
url: '/challenges/12345/my-submissions',
321320
}).then((res) => {

src/shared/components/Content/index.jsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,12 @@ export default function Content() {
102102
</code>
103103
{' '}
104104
of Redux store, or
105-
in
106-
<code>
107-
v3jwt
108-
</code>
109-
{' '}
110-
and
105+
in the
111106
<code>
112107
tcjwt
113108
</code>
114109
{' '}
115-
cookies of the front-end
110+
cookie of the front-end
116111
requests to the server);
117112
</li>
118113
<li>

src/shared/utils/tc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ export function getUnSelectedColors(rating) {
200200
export function getAuthTokens(req = {}) {
201201
const cookies = req.cookies || {};
202202
let tokenV2 = cookies.tcjwt;
203-
let tokenV3 = cookies.v3jwt;
203+
let tokenV3 = cookies.tcjwt;
204+
204205
if (!tokenV2 || isTokenExpired(tokenV2, config.AUTH_DROP_TIME)) {
205206
tokenV2 = '';
206207
}

0 commit comments

Comments
 (0)