import type { EventHandlerRequest, H3Event } from 'h3'; export function clearRefreshTokenCookie(event: H3Event) { deleteCookie(event, 'jwt', { httpOnly: true, sameSite: 'none', secure: true, }); } export function setRefreshTokenCookie( event: H3Event, refreshToken: string, ) { setCookie(event, 'jwt', refreshToken, { httpOnly: true, maxAge: 24 * 60 * 60 * 1000, sameSite: 'none', secure: true, }); } export function getRefreshTokenFromCookie(event: H3Event) { const refreshToken = getCookie(event, 'jwt'); return refreshToken; }