Files
documenso/packages/auth/server/lib/tokens.ts
Mythie 7009995204 wip
2025-01-06 14:44:20 +11:00

6 lines
208 B
TypeScript

import { customAlphabet } from 'nanoid';
const sessionTokenId = customAlphabet('abcdefhiklmnorstuvwxz', 10);
export const createSessionToken = (length = 10) => `session_${sessionTokenId(length)}` as const;