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

13 lines
297 B
TypeScript
Raw Normal View History

2021-12-18 00:50:54 -03:00
import { GetServerSidePropsContext } from 'next'
import { destroyCookie } from 'nookies'
export function destroyCookies(ctx: GetServerSidePropsContext | undefined = undefined) {
destroyCookie(ctx, 'accessToken', {
path: '/'
})
destroyCookie(ctx, 'refreshToken', {
path: '/'
})
}