Skip to content

Commit 6f8ae73

Browse files
committed
align max age with config
1 parent 3cfb2eb commit 6f8ae73

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/server/src/auth/login-completion-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export class LoginCompletionHandler {
108108
const token = await this.authJWT.sign(user.id, {});
109109

110110
response.cookie(SessionHandlerProvider.getJWTCookieName(this.config.hostUrl), token, {
111-
maxAge: 7 * 24 * 60 * 60, // 7 days
111+
maxAge: this.config.session.maxAgeMs,
112112
httpOnly: true,
113113
sameSite: "lax",
114114
secure: true,

components/server/src/session-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class SessionHandlerProvider {
5353
path: "/", // default
5454
httpOnly: true, // default
5555
secure: false, // default, TODO SSL! Config proxy
56-
maxAge: config.session.maxAgeMs, // configured in Helm chart, defaults to 3 days.
56+
maxAge: config.session.maxAgeMs,
5757
sameSite: "lax", // default: true. "Lax" needed for OAuth.
5858
};
5959
}

0 commit comments

Comments
 (0)