function getSession
getSession(token: string): Promise<Session | null>

Get a session by token (with 10s TTL cache) Token is hashed for database lookup

Parameters

token: string

Return Type

Promise<Session | null>

Usage

import { getSession } from "docs/database.ts";