-
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
Conversation
@@ -3,6 +3,9 @@ | |||
/node_modules | |||
/build | |||
|
|||
# migration files | |||
/prisma/Scorecards |
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.
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Using new RegExp(process.env.CORS_ALLOWED_ORIGIN)
can lead to unexpected behavior if the environment variable is not properly formatted as a regular expression. Consider validating or sanitizing the input to ensure it is a valid regex pattern.
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Consider removing the console.log
statement or replacing it with a proper logging mechanism if needed for debugging purposes. Using console.log
in production code can lead to performance issues and may expose sensitive information.
// 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Commenting out the issuer
and audience
fields in verifyOptions
might affect the security and validity of the JWT verification process. Ensure that these fields are intentionally omitted and that their absence does not compromise the application's security requirements.
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Using console.log
for logging decoded tokens can expose sensitive information in production environments. Consider using a more secure logging mechanism or remove this statement if not necessary.
No description provided.