mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	fix(server): Increase authentication cookie max-age (#1971)
This got missed in #1381.
This commit is contained in:
		| @@ -24,7 +24,7 @@ export class AuthCore { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   public getCookies(loginResponse: LoginResponseDto, authType: AuthType, isSecure: boolean) { |   public getCookies(loginResponse: LoginResponseDto, authType: AuthType, isSecure: boolean) { | ||||||
|     const maxAge = 7 * 24 * 3600; // 7 days |     const maxAge = 400 * 24 * 3600; // 400 days | ||||||
|  |  | ||||||
|     let authTypeCookie = ''; |     let authTypeCookie = ''; | ||||||
|     let accessTokenCookie = ''; |     let accessTokenCookie = ''; | ||||||
|   | |||||||
| @@ -338,8 +338,8 @@ export const loginResponseStub = { | |||||||
|       shouldChangePassword: false, |       shouldChangePassword: false, | ||||||
|     }, |     }, | ||||||
|     cookie: [ |     cookie: [ | ||||||
|       'immich_access_token=cmFuZG9tLWJ5dGVz; HttpOnly; Secure; Path=/; Max-Age=604800; SameSite=Lax;', |       'immich_access_token=cmFuZG9tLWJ5dGVz; HttpOnly; Secure; Path=/; Max-Age=34560000; SameSite=Lax;', | ||||||
|       'immich_auth_type=oauth; HttpOnly; Secure; Path=/; Max-Age=604800; SameSite=Lax;', |       'immich_auth_type=oauth; HttpOnly; Secure; Path=/; Max-Age=34560000; SameSite=Lax;', | ||||||
|     ], |     ], | ||||||
|   }, |   }, | ||||||
|   user1password: { |   user1password: { | ||||||
| @@ -354,8 +354,8 @@ export const loginResponseStub = { | |||||||
|       shouldChangePassword: false, |       shouldChangePassword: false, | ||||||
|     }, |     }, | ||||||
|     cookie: [ |     cookie: [ | ||||||
|       'immich_access_token=cmFuZG9tLWJ5dGVz; HttpOnly; Secure; Path=/; Max-Age=604800; SameSite=Lax;', |       'immich_access_token=cmFuZG9tLWJ5dGVz; HttpOnly; Secure; Path=/; Max-Age=34560000; SameSite=Lax;', | ||||||
|       'immich_auth_type=password; HttpOnly; Secure; Path=/; Max-Age=604800; SameSite=Lax;', |       'immich_auth_type=password; HttpOnly; Secure; Path=/; Max-Age=34560000; SameSite=Lax;', | ||||||
|     ], |     ], | ||||||
|   }, |   }, | ||||||
|   user1insecure: { |   user1insecure: { | ||||||
| @@ -370,8 +370,8 @@ export const loginResponseStub = { | |||||||
|       shouldChangePassword: false, |       shouldChangePassword: false, | ||||||
|     }, |     }, | ||||||
|     cookie: [ |     cookie: [ | ||||||
|       'immich_access_token=cmFuZG9tLWJ5dGVz; HttpOnly; Path=/; Max-Age=604800; SameSite=Lax;', |       'immich_access_token=cmFuZG9tLWJ5dGVz; HttpOnly; Path=/; Max-Age=34560000; SameSite=Lax;', | ||||||
|       'immich_auth_type=password; HttpOnly; Path=/; Max-Age=604800; SameSite=Lax;', |       'immich_auth_type=password; HttpOnly; Path=/; Max-Age=34560000; SameSite=Lax;', | ||||||
|     ], |     ], | ||||||
|   }, |   }, | ||||||
| }; | }; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user