{"repo":"maticzav/nookies","free":true,"listed":false,"github":"https://github.com/maticzav/nookies","clone":"git clone https://github.com/maticzav/nookies.git","description":"🍪 A set of cookie helpers for Next.js","language":"TypeScript","stars":2353,"topics":["cookie","nextjs","react","zeit","hacktoberfest"],"license":null,"category":"auth-billing-email","readme_excerpt":"nookies :cookie: A collection of cookie helpers for Next.js Features - ✨ SSR support, for setter, parser and destroy - ⚙️ Custom Express server support - 🪶 super light - 🛡 perfect for authentication Setting and destroying cookies also works on server-side. Quick start yarn add nookies You can play with the example code here. ServerSide cookies Client-only Cookies Custom Express server cookies Reference For client side usage, omit the ctx parameter. You can do so by setting it to an empty object ( {} ), null or undefined . parseCookies(ctx, options) or nookies.get(ctx, options) - ctx: Next.js context (Express request object) - options: - decode: a custom resolver function (default: decodeURIComponent) setCookie(ctx, name, value, options) or nookies.set(ctx, name, value, options) Don't forget to end your response on the server with res.send() . - ctx: (Next.js context) (Express request object) - name: cookie name - value: cookie value - options: - domain - encode - expires - httpOnly - maxAge - path - sameSite - secure destroyCookie(ctx, name, options) or nookies.destroy(ctx, 'token', options) Don't forget to end your response on the server with res.send() . This might be the reason your cookie isn't removed. - ctx: (Next.js context) (Express response object) - name: cookie name - options: - domain - path License MIT","default_branch":null,"files":null,"tree":[],"storefront":"/r/maticzav","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/maticzav/nookies/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}