Files
link-free/src/utils/destroyCookies.ts
T

13 lines
297 B
TypeScript

import { GetServerSidePropsContext } from 'next'
import { destroyCookie } from 'nookies'
export function destroyCookies(ctx: GetServerSidePropsContext | undefined = undefined) {
destroyCookie(ctx, 'accessToken', {
path: '/'
})
destroyCookie(ctx, 'refreshToken', {
path: '/'
})
}