Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
import { createHash } from "crypto"; export const hashToken = ( token: string, { noSecret = false, }: { noSecret?: boolean; } = {}, ) => { return createHash("sha256") .update(`${token}${noSecret ? "" : process.env.NEXTAUTH_SECRET}`) .digest("hex"); };