Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
deleteSession() {
const cookies = nookies.get();
nookies.destroy({}, 'se');
nookies.destroy({}, 'to');
Router.push('/');
}
deleteSession() {
const cookies = nookies.get();
nookies.destroy({}, 'se');
nookies.destroy({}, 'to');
Router.push('/');
}
const removeAuthToken = (ctx?: NextPageContext): boolean => {
if (isServer) {
nookies.destroy(ctx, AUTH_TOKEN_NAME);
}
if (isClient) {
Cookies.remove(AUTH_TOKEN_NAME);
}
return true;
};
const removeAuthInfo = (ctx?: NextPageContext): boolean => {
if (isServer) {
nookies.destroy(ctx, AUTH_INFO);
}
if (isClient) {
Cookies.remove(AUTH_INFO);
}
return true;
};