UNPKG

better-auth

Version:

The most comprehensive authentication framework for TypeScript.

26 lines (25 loc) 597 B
//#region src/plugins/username/schema.ts const getSchema = (normalizer) => { return { user: { fields: { username: { type: "string", required: false, sortable: true, unique: true, returned: true, transform: { input(value) { return typeof value !== "string" ? value : normalizer.username(value); } } }, displayUsername: { type: "string", required: false, transform: { input(value) { return typeof value !== "string" ? value : normalizer.displayUsername(value); } } } } } }; }; //#endregion export { getSchema }; //# sourceMappingURL=schema.mjs.map