From 79c1072cc5ca4458b2e55fd3a534461855a77533 Mon Sep 17 00:00:00 2001 From: Behzad-rabiei Date: Wed, 8 Jan 2025 16:20:03 +0100 Subject: [PATCH 1/2] fix: fix the jwt config --- src/jwt/config/jwt.config.ts | 4 ++-- src/jwt/jwt.service.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jwt/config/jwt.config.ts b/src/jwt/config/jwt.config.ts index 0978039..93d3338 100644 --- a/src/jwt/config/jwt.config.ts +++ b/src/jwt/config/jwt.config.ts @@ -12,9 +12,9 @@ export default registerAs('jwt', () => ({ export const jwtConfigSchema = { JWT_SECRET: Joi.string().required().description('JWT secret'), JWT_AUTH_EXPIRATION_MINUTES: Joi.number() - .default(6000) + .default(60) .description('JWT expiration time in minutes for the auth'), JWT_VERIFICATION_MINUTES: Joi.number() - .default(1000) + .default(10) .description('JWT expiration time in minutes for the verification'), }; diff --git a/src/jwt/jwt.service.ts b/src/jwt/jwt.service.ts index bf886f6..5cd47f2 100644 --- a/src/jwt/jwt.service.ts +++ b/src/jwt/jwt.service.ts @@ -36,7 +36,7 @@ export class JwtService { ) as JwtPayload; } catch (error) { this.logger.error(error, 'Failed to validate token'); - throw new UnauthorizedException('Invalid token'); + throw new UnauthorizedException('Invalid tokengit ad'); } } From 14df5823b8ace8df3a58784e2de4486f0ab0febd Mon Sep 17 00:00:00 2001 From: Behzad-rabiei Date: Wed, 8 Jan 2025 16:20:56 +0100 Subject: [PATCH 2/2] fix: fix the jwt config --- src/jwt/jwt.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jwt/jwt.service.ts b/src/jwt/jwt.service.ts index 5cd47f2..bf886f6 100644 --- a/src/jwt/jwt.service.ts +++ b/src/jwt/jwt.service.ts @@ -36,7 +36,7 @@ export class JwtService { ) as JwtPayload; } catch (error) { this.logger.error(error, 'Failed to validate token'); - throw new UnauthorizedException('Invalid tokengit ad'); + throw new UnauthorizedException('Invalid token'); } }