Skip to content

Commit cc1cf81

Browse files
committed
fix: default value for cookie secrets
1 parent 46f2630 commit cc1cf81

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docker/otp-provider/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ export const config = {
2626
OTP_ATTEMPTS_ALLOWED: process.env.OTP_ATTEMPTS_ALLOWED || '5',
2727
OTP_RESENDS_ALLOWED_PER_DAY: process.env.OTP_RESENDS_ALLOWED_PER_DAY || '4',
2828
OTP_RESEND_INTERVAL_MINUTES: process.env.OTP_RESEND_INTERVAL_MINUTES || '[1,2,5,60]',
29-
COOKIE_SECRET: process.env.COOKIE_SECRET || 'default_secret',
29+
COOKIE_SECRETS: process.env.COOKIE_SECRETS || 's3cr3t1,s3cr3t1,s3cr3t2',
3030
};

docker/otp-provider/src/modules/oidc-provider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { isOrigin, hashEmail } from '../utils/helpers';
66
import { getClients } from './sequelize/queries/client';
77
import type { Response } from 'express';
88

9-
const { JWKS } = config;
9+
const { JWKS, COOKIE_SECRETS } = config;
1010

1111
const jwks = JWKS || {};
1212

@@ -27,7 +27,7 @@ export const getConfig = (): Configuration => {
2727
jwks,
2828
adapter: SequelizeAdapter,
2929
cookies: {
30-
keys: new Keygrip(process.env.COOKIE_SECRETS!?.split(','), 'sha256', 'base64'),
30+
keys: new Keygrip(COOKIE_SECRETS!?.split(','), 'sha256', 'base64'),
3131
},
3232
clientAuthMethods: ['client_secret_basic', 'client_secret_post', 'none'],
3333
issueRefreshToken() {

0 commit comments

Comments
 (0)