Lucia

generateId()

Generates a cryptographically strong random string made of a-z (lowercase) and 0-9.

Definition

function generateId(length: number): string;

Parameters

  • length

Example

import { generateId } from "lucia";

// 10-characters long string
generateId(10);