Skip to content

Commit

Permalink
Merge pull request #169 from Sanketika-Obsrv/token_sign_fix
Browse files Browse the repository at this point in the history
feat: #OBS-I537: updated expiry time for jwt token
  • Loading branch information
HarishGangula authored Jan 30, 2025
2 parents bdca0f8 + 965067b commit 5f0db7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/middlewares/passportAuthenticate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { logger } from '../../shared/utils/logger';

const baseURL = appConfig.BASE_URL;
const private_key: string = appConfig.USER_TOKEN_PRIVATE_KEY;
const expiresIn = appConfig.USER_TOKEN_EXPIRY;
const expiresIn = parseInt(appConfig.USER_TOKEN_EXPIRY) || 86400;

const generateToken = (user: User) => {
const payload = _.pick(user, ['id', 'user_name', 'email_address', 'roles', 'is_owner']);
Expand Down
2 changes: 1 addition & 1 deletion src/shared/resources/appConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ export default {
PUBLIC_CLIENT: env.KEYCLOAK_PUBLIC_CLIENT || 'false',
SSL_REQUIRED: env.KEYCLOAK_SSL_REQUIRED || 'external',
},
USER_TOKEN_EXPIRY: env.USER_TOKEN_EXPIRY || '1d',
USER_TOKEN_EXPIRY: env.USER_TOKEN_EXPIRY || '86400',
STORAGE_TYPES: env.STORAGE_TYPES || '{"lake_house":true,"realtime_store":true}'
};

0 comments on commit 5f0db7c

Please sign in to comment.