Skip to main content

Built and signed on GitHub Actions

A collection of useful utilities for Byteminds PH

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
2 months ago (0.1.4)
function deleteSessionCookie
deleteSessionCookie(
lucia: Lucia,
cookies: Cookies,
): Promise<void>

Deletes the current session cookie by setting a blank session cookie in the provided cookies object.

Examples

import type { Actions } from "./$types"; import { lucia } from "$lib/server/auth"; import * as mod from "@jhenbert/byteminds-util";

export const actions: Actions = { default: async ({ locals, cookies }) => {

//some of your codes

await mod.luciaDeleteSessionCookie(lucia, cookies);

}, };

Parameters

lucia: Lucia
  • An instance of the Lucia authentication library.
cookies: Cookies
  • An object representing the cookies to be set in the HTTP response.

Return Type

Promise<void>
  • A promise that resolves when the session cookie has been successfully deleted.

Add Package

deno add jsr:@jhenbert/byteminds-util

Import symbol

import { deleteSessionCookie } from "@jhenbert/byteminds-util";

---- OR ----

Import directly with a jsr specifier

import { deleteSessionCookie } from "jsr:@jhenbert/byteminds-util";

Add Package

npx jsr add @jhenbert/byteminds-util

Import symbol

import { deleteSessionCookie } from "@jhenbert/byteminds-util";

Add Package

yarn dlx jsr add @jhenbert/byteminds-util

Import symbol

import { deleteSessionCookie } from "@jhenbert/byteminds-util";

Add Package

pnpm dlx jsr add @jhenbert/byteminds-util

Import symbol

import { deleteSessionCookie } from "@jhenbert/byteminds-util";

Add Package

bunx jsr add @jhenbert/byteminds-util

Import symbol

import { deleteSessionCookie } from "@jhenbert/byteminds-util";