How to use the nookies.destroy function in nookies

To help you get started, we’ve selected a few nookies examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github feryandi / PilahPilihPilpres / fe / src / components / Final.js View on Github external
deleteSession() {
    const cookies = nookies.get();
    nookies.destroy({}, 'se');
    nookies.destroy({}, 'to');
    Router.push('/');
  }
github feryandi / PilahPilihPilpres / fe / src / components / Final.js View on Github external
deleteSession() {
    const cookies = nookies.get();
    nookies.destroy({}, 'se');
    nookies.destroy({}, 'to');
    Router.push('/');
  }
github SolidZORO / leaa / packages / leaa-www / src / utils / auth.util.ts View on Github external
const removeAuthToken = (ctx?: NextPageContext): boolean => {
  if (isServer) {
    nookies.destroy(ctx, AUTH_TOKEN_NAME);
  }

  if (isClient) {
    Cookies.remove(AUTH_TOKEN_NAME);
  }

  return true;
};
github SolidZORO / leaa / packages / leaa-www / src / utils / auth.util.ts View on Github external
const removeAuthInfo = (ctx?: NextPageContext): boolean => {
  if (isServer) {
    nookies.destroy(ctx, AUTH_INFO);
  }

  if (isClient) {
    Cookies.remove(AUTH_INFO);
  }

  return true;
};

nookies

A set of cookie helpers for Next.js

MIT
Latest version published 4 years ago

Package Health Score

58 / 100
Full package analysis