Skip to content

Commit 31c3507

Browse files
authored
Merge pull request #91 from topcoder-platform/master
Sync Dev with Master
2 parents abba554 + bc83cd6 commit 31c3507

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/core/auth/guards/roles.guard.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class RolesGuard implements CanActivate {
2424

2525
const { auth0User = {} } = request;
2626
const userRoles = Object.keys(auth0User).reduce((roles, key) => {
27-
if (key.match(/claims\/roles$/gi)) {
27+
if (key.match(/\/roles$/gi)) {
2828
return auth0User[key] as string[];
2929
}
3030

@@ -36,15 +36,15 @@ export class RolesGuard implements CanActivate {
3636
}
3737

3838
const userHandle = Object.keys(auth0User).reduce((handles, key) => {
39-
if (key.match(/claims\/handle$/gi)) {
39+
if (key.match(/\/handle$/gi)) {
4040
return auth0User[key] as string;
4141
}
4242

4343
return handles;
4444
}, []);
4545

4646
const userId = Object.keys(auth0User).reduce((ids, key) => {
47-
if (key.match(/claims\/userId$/gi)) {
47+
if (key.match(/\/userId$/gi)) {
4848
return auth0User[key] as string;
4949
}
5050

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async function bootstrap() {
3030
'http://localhost:3000',
3131
/\.localhost:3000$/,
3232
ENV_CONFIG.TOPCODER_WALLET_URL,
33-
/^https:\/\/[\w-]+\.topcoder-dev\.com$/, // allow wallet-v6 and other subdomains
33+
/^https:\/\/[\w-]+\.topcoder(-dev)?\.com$/, // allow wallet-v6 and other subdomains
3434
];
3535

3636
const corsConfig: cors.CorsOptions = {

0 commit comments

Comments
 (0)