Skip to content

Commit

Permalink
feat(env): Add SUBSCRIBER_WIDGET_JWT_EXPIRATION_TIME to environment c…
Browse files Browse the repository at this point in the history
…onfigurations
  • Loading branch information
merrcury committed Nov 28, 2024
1 parent 253133e commit 767680a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/api/src/.example.env
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@ API_RATE_LIMIT_MAXIMUM_FREE_GLOBAL=
API_RATE_LIMIT_MAXIMUM_UNLIMITED_TRIGGER=
API_RATE_LIMIT_MAXIMUM_UNLIMITED_CONFIGURATION=
API_RATE_LIMIT_MAXIMUM_UNLIMITED_GLOBAL=
SUBSCRIBER_WIDGET_JWT_EXPIRATION_TIME='15 days'
1 change: 1 addition & 0 deletions apps/worker/src/.example.env
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,4 @@ LAUNCH_DARKLY_SDK_KEY=

BROADCAST_QUEUE_CHUNK_SIZE=100
MULTICAST_QUEUE_CHUNK_SIZE=100
SUBSCRIBER_WIDGET_JWT_EXPIRATION_TIME='15 days'
1 change: 1 addition & 0 deletions docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ SENTRY_DSN=
# change these values
NEW_RELIC_APP_NAME=
NEW_RELIC_LICENSE_KEY=
SUBSCRIBER_WIDGET_JWT_EXPIRATION_TIME="15 days"
2 changes: 2 additions & 0 deletions docker/local/deployment/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ services:
NEW_RELIC_APP_NAME: ${NEW_RELIC_APP_NAME}
NEW_RELIC_LICENSE_KEY: ${NEW_RELIC_LICENSE_KEY}
API_CONTEXT_PATH: ${API_CONTEXT_PATH}
SUBSCRIBER_WIDGET_JWT_EXPIRATION_TIME: ${SUBSCRIBER_WIDGET_JWT_EXPIRATION_TIME}
ports:
- '3000:3000'
worker:
Expand Down Expand Up @@ -98,6 +99,7 @@ services:
NEW_RELIC_LICENSE_KEY: ${NEW_RELIC_LICENSE_KEY}
BROADCAST_QUEUE_CHUNK_SIZE: ${BROADCAST_QUEUE_CHUNK_SIZE}
MULTICAST_QUEUE_CHUNK_SIZE: ${MULTICAST_QUEUE_CHUNK_SIZE}
SUBSCRIBER_WIDGET_JWT_EXPIRATION_TIME: ${SUBSCRIBER_WIDGET_JWT_EXPIRATION_TIME}
ws:
image: 'ghcr.io/novuhq/novu/ws:0.24.0'
depends_on:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,11 @@ export class AuthService {
subscriberId: subscriber.subscriberId,
},
{
expiresIn: '15 day',
expiresIn:
process.env.SUBSCRIBER_WIDGET_JWT_EXPIRATION_TIME || '15 days',
issuer: 'novu_api',
audience: 'widget_user',
}
},
);
}

Expand Down

0 comments on commit 767680a

Please sign in to comment.