()
| 7 | const cookieScope = { domain: process.env.NEXT_PUBLIC_DOMAIN, path: '/' }; |
| 8 | |
| 9 | export const markSignedOut = async (): Promise<void> => { |
| 10 | setCookie(SIGNED_OUT_COOKIE, 1, { |
| 11 | ...cookieScope, |
| 12 | maxAge: THIRTY_DAYS, |
| 13 | sameSite: 'lax', |
| 14 | }); |
| 15 | try { |
| 16 | await globalThis.navigator?.credentials?.preventSilentAccess?.(); |
| 17 | } catch { |
| 18 | // The cookie above is what the homepage reads; this is best effort. |
| 19 | } |
| 20 | }; |
| 21 | |
| 22 | export const clearSignedOut = (): void => { |
| 23 | if (getCookies([SIGNED_OUT_COOKIE])?.[SIGNED_OUT_COOKIE]) { |
no test coverage detected