diff --git a/docs/content/docs/reference/options.mdx b/docs/content/docs/reference/options.mdx index 6ddddda4..196aa96d 100644 --- a/docs/content/docs/reference/options.mdx +++ b/docs/content/docs/reference/options.mdx @@ -371,7 +371,14 @@ export const auth = betterAuth({ httpOnly: true, secure: true }, - cookiePrefix: "myapp" + cookiePrefix: "myapp", + generateId: ((options: { + model: LiteralUnion; + size?: number; + }) => { + // Generate a unique ID for the model + return "my-id"; + }) }, }) ``` @@ -383,6 +390,7 @@ export const auth = betterAuth({ - `cookies`: Customize cookie names and attributes - `defaultCookieAttributes`: Default attributes for all cookies - `cookiePrefix`: Prefix for cookies +- `generateId`: Function to generate a unique ID for a model ## `databaseHooks`