mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-06-16 05:50:15 -04:00
fix: refactor cookie settings for Home Assistant i-frame login (#7741)
This commit is contained in:
9
frontend/app/composables/use-token-cookie.ts
Normal file
9
frontend/app/composables/use-token-cookie.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export function getTokenCookieOptions(): Parameters<typeof useCookie>[1] {
|
||||
const isSecureConnection = useNuxtApp().$appInfo.production && window?.location?.protocol === "https:";
|
||||
return {
|
||||
maxAge: useNuxtApp().$appInfo.tokenTime * 60 * 60,
|
||||
secure: isSecureConnection,
|
||||
sameSite: isSecureConnection ? "none" : "lax",
|
||||
partitioned: isSecureConnection,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user