Skip to content

Commit 2f1f37b

Browse files
feat(server): add rememberMeDuration to AuthSettings
- Add rememberMeDuration field to AuthSettings interface - Query remember_me_duration from app_settings_auth table - Used by cookie config when rememberMe=true in sign-in Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 960eefc commit 2f1f37b

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

graphql/server/src/middleware/api.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ const AUTH_SETTINGS_SQL = (schemaName: string, tableName: string) => `
133133
cookie_httponly,
134134
cookie_max_age,
135135
cookie_path,
136+
remember_me_duration,
136137
enable_captcha,
137138
captcha_site_key
138139
FROM "${schemaName}"."${tableName}"
@@ -266,6 +267,7 @@ interface AuthSettingsRow {
266267
cookie_httponly: boolean;
267268
cookie_max_age: string | null;
268269
cookie_path: string;
270+
remember_me_duration: string | null;
269271
enable_captcha: boolean;
270272
captcha_site_key: string | null;
271273
}
@@ -453,6 +455,7 @@ const toAuthSettings = (row: AuthSettingsRow | null): AuthSettings | undefined =
453455
cookieHttponly: row.cookie_httponly,
454456
cookieMaxAge: row.cookie_max_age,
455457
cookiePath: row.cookie_path,
458+
rememberMeDuration: row.remember_me_duration,
456459
enableCaptcha: row.enable_captcha,
457460
captchaSiteKey: row.captcha_site_key,
458461
};

graphql/server/src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ export interface AuthSettings {
9999
cookieHttponly?: boolean;
100100
cookieMaxAge?: string | null;
101101
cookiePath?: string;
102+
/** Remember me duration (seconds) for extended session cookies */
103+
rememberMeDuration?: string | null;
102104
/** reCAPTCHA / CAPTCHA */
103105
enableCaptcha?: boolean;
104106
captchaSiteKey?: string | null;

0 commit comments

Comments
 (0)