-
Notifications
You must be signed in to change notification settings - Fork 6
Sync with develop #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0a86c70
9519eba
23b7705
37ea759
0dbf7f5
b876f56
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ | |
/node_modules | ||
/build | ||
|
||
# migration files | ||
/prisma/Scorecards | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,14 @@ async function bootstrap() { | |
credentials: true, | ||
origin: process.env.CORS_ALLOWED_ORIGIN | ||
? new RegExp(process.env.CORS_ALLOWED_ORIGIN) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using |
||
: ['http://localhost:3000', /\.localhost:3000$/], | ||
: [ | ||
'http://localhost:3000', | ||
/\.localhost:3000$/, | ||
'https://topcoder.com', | ||
'https://topcoder-dev.com', | ||
/\.topcoder-dev\.com$/, | ||
/\.topcoder\.com$/, | ||
], | ||
methods: 'GET, POST, OPTIONS, PUT, DELETE, PATCH', | ||
}; | ||
app.use(cors(corsConfig)); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,10 +94,12 @@ export class JwtService implements OnModuleInit { | |
// Get the signing key from Auth0 | ||
const signingKey = await this.getSigningKey(tokenHeader.kid); | ||
|
||
console.log(`Signing key: ${JSON.stringify(signingKey)}`); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider removing the |
||
|
||
// Verify options | ||
const verifyOptions: VerifyOptions = { | ||
issuer: AuthConfig.jwt.issuer, | ||
audience: AuthConfig.jwt.audience, | ||
//issuer: AuthConfig.jwt.issuer, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Commenting out the |
||
//audience: AuthConfig.jwt.audience, | ||
clockTolerance: AuthConfig.jwt.clockTolerance, | ||
ignoreExpiration: AuthConfig.jwt.ignoreExpiration, | ||
}; | ||
|
@@ -117,6 +119,7 @@ export class JwtService implements OnModuleInit { | |
throw new UnauthorizedException('Invalid token'); | ||
} | ||
|
||
console.log(`Decoded token: ${JSON.stringify(decodedToken)}`); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using |
||
const user: JwtUser = { isMachine: false }; | ||
|
||
// Check for M2M token from Auth0 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider specifying the file types or patterns to ignore within the
/prisma/Scorecards
directory to avoid unintentionally ignoring necessary files.