[{"data":1,"prerenderedAt":1970},["ShallowReactive",2],{"navigation_docs":3,"-docs-core-users-and-access-authentication":478,"-docs-core-users-and-access-authentication-surround":1965},[4,352,446],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Docs",false,"\u002Fdocs\u002Fcore","docs\u002F1.core",[10,35,141,174,195,212,242,318],{"title":11,"icon":6,"path":12,"stem":13,"children":14,"page":6},"Getting Started","\u002Fdocs\u002Fcore\u002Fgetting-started","docs\u002F1.core\u002F1.getting-started",[15,19,23,27,31],{"title":16,"path":17,"stem":18},"Introduction","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fintroduction","docs\u002F1.core\u002F1.getting-started\u002F1.introduction",{"title":20,"path":21,"stem":22},"Quick Start","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fquick-start","docs\u002F1.core\u002F1.getting-started\u002F2.quick-start",{"title":24,"path":25,"stem":26},"Add to an Existing Site","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fexisting-site","docs\u002F1.core\u002F1.getting-started\u002F3.existing-site",{"title":28,"path":29,"stem":30},"Configuration","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fconfiguration","docs\u002F1.core\u002F1.getting-started\u002F4.configuration",{"title":32,"path":33,"stem":34},"How Tenon works","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fhow-tenon-works","docs\u002F1.core\u002F1.getting-started\u002F5.how-tenon-works",{"title":36,"icon":6,"path":37,"stem":38,"children":39,"page":6},"Content Modeling","\u002Fdocs\u002Fcore\u002Fcontent-modeling","docs\u002F1.core\u002F2.content-modeling",[40,44,111,115,119],{"title":41,"path":42,"stem":43},"Collections and Globals","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fcollections-and-globals","docs\u002F1.core\u002F2.content-modeling\u002F1.collections-and-globals",{"title":45,"icon":6,"path":46,"stem":47,"children":48},"Fields","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002Findex",[49,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107],{"title":50,"path":46,"stem":47},"Overview",{"title":52,"path":53,"stem":54},"Array","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Farray","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F01.array",{"title":56,"path":57,"stem":58},"Blocks","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fblocks","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F02.blocks",{"title":60,"path":61,"stem":62},"Boolean","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fboolean","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F03.boolean",{"title":64,"path":65,"stem":66},"Date","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fdate","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F04.date",{"title":68,"path":69,"stem":70},"File","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Ffile","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F05.file",{"title":72,"path":73,"stem":74},"Group","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fgroup","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F06.group",{"title":76,"path":77,"stem":78},"Image","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fimage","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F07.image",{"title":80,"path":81,"stem":82},"Link","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Flink","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F08.link",{"title":84,"path":85,"stem":86},"Number","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fnumber","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F09.number",{"title":88,"path":89,"stem":90},"Relation","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Frelation","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F10.relation",{"title":92,"path":93,"stem":94},"Rich text","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Frich-text","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F11.rich-text",{"title":96,"path":97,"stem":98},"Select","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fselect","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F12.select",{"title":100,"path":101,"stem":102},"Size","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fsize","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F13.size",{"title":104,"path":105,"stem":106},"Slug","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fslug","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F14.slug",{"title":108,"path":109,"stem":110},"Text","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Ftext","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F15.text",{"title":112,"path":113,"stem":114},"Relations","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Frelations","docs\u002F1.core\u002F2.content-modeling\u002F3.relations",{"title":116,"path":117,"stem":118},"Media","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fmedia","docs\u002F1.core\u002F2.content-modeling\u002F4.media",{"title":120,"icon":6,"path":121,"stem":122,"children":123},"Presets","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002Findex",[124,125,129,133,137],{"title":50,"path":121,"stem":122},{"title":126,"path":127,"stem":128},"Menu","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fmenu","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F1.menu",{"title":130,"path":131,"stem":132},"Pages","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fpages","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F2.pages",{"title":134,"path":135,"stem":136},"Settings","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fsettings","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F3.settings",{"title":138,"path":139,"stem":140},"Strings","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fstrings","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F4.strings",{"title":142,"icon":6,"path":143,"stem":144,"children":145,"page":6},"Working with Content","\u002Fdocs\u002Fcore\u002Fworking-with-content","docs\u002F1.core\u002F3.working-with-content",[146,150,154,158,162,166,170],{"title":147,"path":148,"stem":149},"Reading","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Freading","docs\u002F1.core\u002F3.working-with-content\u002F1.reading",{"title":151,"path":152,"stem":153},"Writing and Drafts","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fwriting","docs\u002F1.core\u002F3.working-with-content\u002F2.writing",{"title":155,"path":156,"stem":157},"Scheduled publishing","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fscheduled-publishing","docs\u002F1.core\u002F3.working-with-content\u002F3.scheduled-publishing",{"title":159,"path":160,"stem":161},"HTTP API and Client","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fhttp-api-and-client","docs\u002F1.core\u002F3.working-with-content\u002F4.http-api-and-client",{"title":163,"path":164,"stem":165},"Headless","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fheadless","docs\u002F1.core\u002F3.working-with-content\u002F5.headless",{"title":167,"path":168,"stem":169},"Localization","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Flocalization","docs\u002F1.core\u002F3.working-with-content\u002F6.localization",{"title":171,"path":172,"stem":173},"Hooks","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fhooks","docs\u002F1.core\u002F3.working-with-content\u002F7.hooks",{"title":175,"icon":6,"path":176,"stem":177,"children":178,"page":6},"Building Your Site","\u002Fdocs\u002Fcore\u002Fbuilding-your-site","docs\u002F1.core\u002F4.building-your-site",[179,183,187,191],{"title":180,"path":181,"stem":182},"Pages and SEO","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fpages-and-seo","docs\u002F1.core\u002F4.building-your-site\u002F1.pages-and-seo",{"title":184,"path":185,"stem":186},"Components","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fcomponents","docs\u002F1.core\u002F4.building-your-site\u002F2.components",{"title":188,"path":189,"stem":190},"Menus","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fmenus","docs\u002F1.core\u002F4.building-your-site\u002F3.menus",{"title":192,"path":193,"stem":194},"Live Preview","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Flive-preview","docs\u002F1.core\u002F4.building-your-site\u002F4.live-preview",{"title":196,"icon":6,"path":197,"stem":198,"children":199,"page":6},"Users and Access","\u002Fdocs\u002Fcore\u002Fusers-and-access","docs\u002F1.core\u002F5.users-and-access",[200,204,208],{"title":201,"path":202,"stem":203},"Authentication","\u002Fdocs\u002Fcore\u002Fusers-and-access\u002Fauthentication","docs\u002F1.core\u002F5.users-and-access\u002F1.authentication",{"title":205,"path":206,"stem":207},"Access Control","\u002Fdocs\u002Fcore\u002Fusers-and-access\u002Faccess-control","docs\u002F1.core\u002F5.users-and-access\u002F2.access-control",{"title":209,"path":210,"stem":211},"API Keys","\u002Fdocs\u002Fcore\u002Fusers-and-access\u002Fapi-keys","docs\u002F1.core\u002F5.users-and-access\u002F3.api-keys",{"title":213,"icon":6,"path":214,"stem":215,"children":216},"Customization","\u002Fdocs\u002Fcore\u002Fcustomization","docs\u002F1.core\u002F6.customization\u002Findex",[217,218,222,226,230,234,238],{"title":50,"path":214,"stem":215},{"title":219,"path":220,"stem":221},"Admin","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fadmin","docs\u002F1.core\u002F6.customization\u002F1.admin",{"title":223,"path":224,"stem":225},"Custom Fields","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fcustom-fields","docs\u002F1.core\u002F6.customization\u002F2.custom-fields",{"title":227,"path":228,"stem":229},"Custom Pages and Actions","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fcustom-pages-and-actions","docs\u002F1.core\u002F6.customization\u002F3.custom-pages-and-actions",{"title":231,"path":232,"stem":233},"Styles and UI Libraries","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fstyles-and-ui-libraries","docs\u002F1.core\u002F6.customization\u002F4.styles-and-ui-libraries",{"title":235,"path":236,"stem":237},"Rich Text Extensions","\u002Fdocs\u002Fcore\u002Fcustomization\u002Frich-text-extensions","docs\u002F1.core\u002F6.customization\u002F5.rich-text-extensions",{"title":239,"path":240,"stem":241},"Plugins","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fplugins","docs\u002F1.core\u002F6.customization\u002F6.plugins",{"title":243,"icon":6,"path":244,"stem":245,"children":246},"Operations","\u002Fdocs\u002Fcore\u002Foperations","docs\u002F1.core\u002F7.operations\u002Findex",[247,248,266,288,306,310,314],{"title":50,"path":244,"stem":245},{"title":249,"icon":6,"path":250,"stem":251,"children":252},"Email","\u002Fdocs\u002Fcore\u002Foperations\u002Femail","docs\u002F1.core\u002F7.operations\u002F1.email\u002Findex",[253,254,258,262],{"title":50,"path":250,"stem":251},{"title":255,"path":256,"stem":257},"SMTP","\u002Fdocs\u002Fcore\u002Foperations\u002Femail\u002Fsmtp","docs\u002F1.core\u002F7.operations\u002F1.email\u002F1.smtp",{"title":259,"path":260,"stem":261},"Cloudflare","\u002Fdocs\u002Fcore\u002Foperations\u002Femail\u002Fcloudflare","docs\u002F1.core\u002F7.operations\u002F1.email\u002F2.cloudflare",{"title":263,"path":264,"stem":265},"Custom adapter","\u002Fdocs\u002Fcore\u002Foperations\u002Femail\u002Fcustom-adapter","docs\u002F1.core\u002F7.operations\u002F1.email\u002F3.custom-adapter",{"title":267,"icon":6,"path":268,"stem":269,"children":270},"Jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002Findex",[271,272,276,280,284],{"title":50,"path":268,"stem":269},{"title":273,"path":274,"stem":275},"Queue jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Fqueue-jobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F1.queue-jobs",{"title":277,"path":278,"stem":279},"Recurring jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Frecurring-jobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F2.recurring-jobs",{"title":281,"path":282,"stem":283},"The clock","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Fclock","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F3.clock",{"title":285,"path":286,"stem":287},"Manage jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Fmanage-jobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F4.manage-jobs",{"title":289,"icon":6,"path":290,"stem":291,"children":292},"Webhooks","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002Findex",[293,294,298,302],{"title":50,"path":290,"stem":291},{"title":295,"path":296,"stem":297},"Send webhooks","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks\u002Fsend-webhooks","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002F1.send-webhooks",{"title":299,"path":300,"stem":301},"Receive webhooks","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks\u002Freceive-webhooks","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002F2.receive-webhooks",{"title":303,"path":304,"stem":305},"Rebuild on publish","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks\u002Frebuild-on-publish","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002F3.rebuild-on-publish",{"title":307,"path":308,"stem":309},"Backup and Restore","\u002Fdocs\u002Fcore\u002Foperations\u002Fbackup-and-restore","docs\u002F1.core\u002F7.operations\u002F4.backup-and-restore",{"title":311,"path":312,"stem":313},"Lifecycle Hooks","\u002Fdocs\u002Fcore\u002Foperations\u002Flifecycle-hooks","docs\u002F1.core\u002F7.operations\u002F5.lifecycle-hooks",{"title":315,"path":316,"stem":317},"Upgrades and Schema Changes","\u002Fdocs\u002Fcore\u002Foperations\u002Fupgrades-and-schema-changes","docs\u002F1.core\u002F7.operations\u002F6.upgrades-and-schema-changes",{"title":319,"icon":6,"path":320,"stem":321,"children":322,"page":6},"Reference","\u002Fdocs\u002Fcore\u002Freference","docs\u002F1.core\u002F8.reference",[323,326,344,348],{"title":28,"path":324,"stem":325},"\u002Fdocs\u002Fcore\u002Freference\u002Fconfiguration","docs\u002F1.core\u002F8.reference\u002F1.configuration",{"title":327,"icon":6,"path":328,"stem":329,"children":330},"API","\u002Fdocs\u002Fcore\u002Freference\u002Fapi","docs\u002F1.core\u002F8.reference\u002F2.api\u002Findex",[331,332,336,340],{"title":50,"path":328,"stem":329},{"title":333,"path":334,"stem":335},"Local API","\u002Fdocs\u002Fcore\u002Freference\u002Fapi\u002Flocal-api","docs\u002F1.core\u002F8.reference\u002F2.api\u002F1.local-api",{"title":337,"path":338,"stem":339},"Client","\u002Fdocs\u002Fcore\u002Freference\u002Fapi\u002Fclient","docs\u002F1.core\u002F8.reference\u002F2.api\u002F2.client",{"title":341,"path":342,"stem":343},"HTTP routes","\u002Fdocs\u002Fcore\u002Freference\u002Fapi\u002Fhttp-routes","docs\u002F1.core\u002F8.reference\u002F2.api\u002F3.http-routes",{"title":345,"path":346,"stem":347},"Errors and types","\u002Fdocs\u002Fcore\u002Freference\u002Ferrors-and-types","docs\u002F1.core\u002F8.reference\u002F3.errors-and-types",{"title":349,"path":350,"stem":351},"Package exports","\u002Fdocs\u002Fcore\u002Freference\u002Fpackage-exports","docs\u002F1.core\u002F8.reference\u002F4.package-exports",{"title":353,"icon":6,"path":354,"stem":355,"children":356,"page":6},"Guide","\u002Fdocs\u002Fguide","docs\u002F2.guide",[357,383,400,417],{"title":358,"icon":6,"path":359,"stem":360,"children":361},"Frameworks","\u002Fdocs\u002Fguide\u002Fframeworks","docs\u002F2.guide\u002F1.frameworks\u002Findex",[362,363,367,371,375,379],{"title":50,"path":359,"stem":360},{"title":364,"path":365,"stem":366},"Astro","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fastro","docs\u002F2.guide\u002F1.frameworks\u002F1.astro",{"title":368,"path":369,"stem":370},"Nuxt","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fnuxt","docs\u002F2.guide\u002F1.frameworks\u002F2.nuxt",{"title":372,"path":373,"stem":374},"TanStack Start","\u002Fdocs\u002Fguide\u002Fframeworks\u002Ftanstack-start","docs\u002F2.guide\u002F1.frameworks\u002F3.tanstack-start",{"title":376,"path":377,"stem":378},"Standalone","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fstandalone","docs\u002F2.guide\u002F1.frameworks\u002F4.standalone",{"title":380,"path":381,"stem":382},"Other Frameworks","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fother-frameworks","docs\u002F2.guide\u002F1.frameworks\u002F5.other-frameworks",{"title":384,"icon":6,"path":385,"stem":386,"children":387},"Deployment","\u002Fdocs\u002Fguide\u002Fdeployment","docs\u002F2.guide\u002F2.deployment\u002Findex",[388,389,393,397],{"title":50,"path":385,"stem":386},{"title":390,"path":391,"stem":392},"Node","\u002Fdocs\u002Fguide\u002Fdeployment\u002Fnode","docs\u002F2.guide\u002F2.deployment\u002F1.node",{"title":394,"path":395,"stem":396},"Vercel","\u002Fdocs\u002Fguide\u002Fdeployment\u002Fvercel","docs\u002F2.guide\u002F2.deployment\u002F2.vercel",{"title":259,"path":398,"stem":399},"\u002Fdocs\u002Fguide\u002Fdeployment\u002Fcloudflare","docs\u002F2.guide\u002F2.deployment\u002F3.cloudflare",{"title":401,"icon":6,"path":402,"stem":403,"children":404,"page":6},"Databases and Storage","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage","docs\u002F2.guide\u002F3.databases-and-storage",[405,409,413],{"title":406,"path":407,"stem":408},"Databases","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage\u002Fdatabases","docs\u002F2.guide\u002F3.databases-and-storage\u002F1.databases",{"title":410,"path":411,"stem":412},"Media Storage","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage\u002Fmedia-storage","docs\u002F2.guide\u002F3.databases-and-storage\u002F2.media-storage",{"title":414,"path":415,"stem":416},"Image Providers","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage\u002Fimage-providers","docs\u002F2.guide\u002F3.databases-and-storage\u002F3.image-providers",{"title":418,"icon":6,"path":419,"stem":420,"children":421,"page":6},"Recipes","\u002Fdocs\u002Fguide\u002Frecipes","docs\u002F2.guide\u002F4.recipes",[422,426,430,434,438,442],{"title":423,"path":424,"stem":425},"Seed Content","\u002Fdocs\u002Fguide\u002Frecipes\u002Fseed-content","docs\u002F2.guide\u002F4.recipes\u002F1.seed-content",{"title":427,"path":428,"stem":429},"Tracking and Consent","\u002Fdocs\u002Fguide\u002Frecipes\u002Ftracking-and-consent","docs\u002F2.guide\u002F4.recipes\u002F2.tracking-and-consent",{"title":431,"path":432,"stem":433},"Build a Custom Field","\u002Fdocs\u002Fguide\u002Frecipes\u002Fbuild-a-custom-field","docs\u002F2.guide\u002F4.recipes\u002F3.build-a-custom-field",{"title":435,"path":436,"stem":437},"Write a Plugin","\u002Fdocs\u002Fguide\u002Frecipes\u002Fwrite-a-plugin","docs\u002F2.guide\u002F4.recipes\u002F4.write-a-plugin",{"title":439,"path":440,"stem":441},"Build a Headless Site with Next.js","\u002Fdocs\u002Fguide\u002Frecipes\u002Fbuild-a-headless-site-with-nextjs","docs\u002F2.guide\u002F4.recipes\u002F5.build-a-headless-site-with-nextjs",{"title":443,"path":444,"stem":445},"Troubleshooting","\u002Fdocs\u002Fguide\u002Frecipes\u002Ftroubleshooting","docs\u002F2.guide\u002F4.recipes\u002F6.troubleshooting",{"title":447,"icon":6,"path":448,"stem":449,"children":450,"page":6},"CLI","\u002Fdocs\u002Fcli","docs\u002F3.cli",[451,454,458,462,466,470,474],{"title":50,"path":452,"stem":453},"\u002Fdocs\u002Fcli\u002Foverview","docs\u002F3.cli\u002F1.overview",{"title":455,"path":456,"stem":457},"create-tenoncms","\u002Fdocs\u002Fcli\u002Fcreate-tenoncms","docs\u002F3.cli\u002F2.create-tenoncms",{"title":459,"path":460,"stem":461},"tenon backup","\u002Fdocs\u002Fcli\u002Fbackup","docs\u002F3.cli\u002F3.backup",{"title":463,"path":464,"stem":465},"tenon users","\u002Fdocs\u002Fcli\u002Fusers","docs\u002F3.cli\u002F4.users",{"title":467,"path":468,"stem":469},"tenon media","\u002Fdocs\u002Fcli\u002Fmedia","docs\u002F3.cli\u002F5.media",{"title":471,"path":472,"stem":473},"tenon upgrade","\u002Fdocs\u002Fcli\u002Fupgrade","docs\u002F3.cli\u002F6.upgrade",{"title":475,"path":476,"stem":477},"tenon login","\u002Fdocs\u002Fcli\u002Flogin","docs\u002F3.cli\u002F7.login",{"id":479,"title":201,"body":480,"description":1959,"extension":1960,"links":1961,"meta":1962,"navigation":827,"path":202,"seo":1963,"stem":203,"__hash__":1964},"docs\u002Fdocs\u002F1.core\u002F5.users-and-access\u002F1.authentication.md",{"type":481,"value":482,"toc":1943},"minimark",[483,487,507,512,519,536,547,551,554,650,1154,1197,1201,1206,1213,1228,1235,1238,1243,1254,1257,1260,1265,1287,1290,1308,1314,1318,1334,1450,1454,1457,1503,1579,1582,1586,1605,1609,1616,1634,1638,1641,1783,1793,1801,1805,1808,1892,1901,1905,1939],[484,485,486],"p",{},"Editors sign in to the admin with an email and a password by default. You can add passkeys, sign-in links and sign-in codes, or turn passwords off. This page explains how sign-in works, how to pick the methods, and what to do when nobody can sign in.",[484,488,489,490,497,498,502,503,506],{},"Tenon builds on ",[491,492,496],"a",{"href":493,"rel":494},"https:\u002F\u002Fbetter-auth.com",[495],"nofollow","better-auth",". The ",[499,500,501],"code",{},"auth"," option of ",[499,504,505],{},"defineCms()"," takes better-auth's options, so its plugins and settings (should) work here too. If the better-auth plugins require some kind of ui, you will likely need to add it yourself through a plugin. (Guide will follow)",[508,509,511],"h2",{"id":510},"how-sign-in-works","How sign-in works",[484,513,514,515,518],{},"The admin's sign-in page is ",[499,516,517],{},"\u002Fadmin\u002Flogin",".",[520,521,522,526,533],"ol",{},[523,524,525],"li",{},"While no user exists, the admin opens a sign-up page. The person who signs up becomes the first admin.",[523,527,528,529,518],{},"After that, sign-up is closed. New users join by invite. See ",[491,530,532],{"href":531},"\u002Fdocs\u002Fcore\u002Fusers-and-access\u002Faccess-control#users-and-roles","Users and roles",[523,534,535],{},"A user who signs in gets a session cookie. The admin, the live preview and the admin bar use it.",[484,537,538,539,543,544,546],{},"The sign-in page asks for the email first. ",[540,541,542],"strong",{},"Continue"," then shows the methods that are on. On the next visit, ",[540,545,542],{}," goes straight to the method used last on this device.",[508,548,550],{"id":549},"sign-in-methods","Sign-in methods",[484,552,553],{},"Pick any mix of these methods:",[555,556,557,576],"table",{},[558,559,560],"thead",{},[561,562,563,567,570,573],"tr",{},[564,565,566],"th",{},"Method",[564,568,569],{},"Turn it on",[564,571,572],{},"Default",[564,574,575],{},"Needs",[577,578,579,598,618,634],"tbody",{},[561,580,581,585,592,595],{},[582,583,584],"td",{},"Password",[582,586,587,588,591],{},"On unless ",[499,589,590],{},"emailAndPassword.enabled"," is false",[582,593,594],{},"on",[582,596,597],{},"–",[561,599,600,603,610,613],{},[582,601,602],{},"Passkey",[582,604,605,606,609],{},"Add the ",[499,607,608],{},"passkey()"," plugin",[582,611,612],{},"off",[582,614,615],{},[499,616,617],{},"@better-auth\u002Fpasskey",[561,619,620,623,628,630],{},[582,621,622],{},"Magic link",[582,624,605,625,609],{},[499,626,627],{},"magicLink()",[582,629,612],{},[582,631,632],{},[491,633,249],{"href":250},[561,635,636,639,644,646],{},[582,637,638],{},"Email code",[582,640,605,641,609],{},[499,642,643],{},"emailOTP()",[582,645,612],{},[582,647,648],{},[491,649,249],{"href":250},[651,652,653,767,909,1028],"tabs",{},[654,655,656,663,758],"tabs-item",{"label":584},[484,657,658,659,662],{},"Password sign-in is on by default. better-auth's ",[499,660,661],{},"emailAndPassword"," options change its rules:",[664,665,671],"pre",{"className":666,"code":667,"filename":668,"language":669,"meta":670,"style":670},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export default defineCms({\n  \u002F\u002F ...\n  auth: {\n    emailAndPassword: { minPasswordLength: 12 },\n  },\n});\n","tenon.config.ts","ts","",[499,672,673,697,704,717,740,746],{"__ignoreMap":670},[674,675,678,682,685,689,693],"span",{"class":676,"line":677},"line",1,[674,679,681],{"class":680},"s7zQu","export",[674,683,684],{"class":680}," default",[674,686,688],{"class":687},"s2Zo4"," defineCms",[674,690,692],{"class":691},"sTEyZ","(",[674,694,696],{"class":695},"sMK4o","{\n",[674,698,700],{"class":676,"line":699},2,[674,701,703],{"class":702},"sHwdD","  \u002F\u002F ...\n",[674,705,707,711,714],{"class":676,"line":706},3,[674,708,710],{"class":709},"swJcz","  auth",[674,712,713],{"class":695},":",[674,715,716],{"class":695}," {\n",[674,718,720,723,725,728,731,733,737],{"class":676,"line":719},4,[674,721,722],{"class":709},"    emailAndPassword",[674,724,713],{"class":695},[674,726,727],{"class":695}," {",[674,729,730],{"class":709}," minPasswordLength",[674,732,713],{"class":695},[674,734,736],{"class":735},"sbssI"," 12",[674,738,739],{"class":695}," },\n",[674,741,743],{"class":676,"line":742},5,[674,744,745],{"class":695},"  },\n",[674,747,749,752,755],{"class":676,"line":748},6,[674,750,751],{"class":695},"}",[674,753,754],{"class":691},")",[674,756,757],{"class":695},";\n",[484,759,760,763,764,518],{},[540,761,762],{},"Forgot password?"," on the sign-in page sends a reset link. It needs ",[491,765,766],{"href":250},"email",[654,768,769,772,792,886],{"label":602},[484,770,771],{},"A passkey signs in with the fingerprint, the face or the PIN of a device. Install the plugin first:",[664,773,777],{"className":774,"code":775,"language":776,"meta":670,"style":670},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install @better-auth\u002Fpasskey\n","bash",[499,778,779],{"__ignoreMap":670},[674,780,781,785,789],{"class":676,"line":677},[674,782,784],{"class":783},"sBMFI","npm",[674,786,788],{"class":787},"sfazB"," install",[674,790,791],{"class":787}," @better-auth\u002Fpasskey\n",[664,793,795],{"className":666,"code":794,"filename":668,"language":669,"meta":670,"style":670},"import { passkey } from \"@better-auth\u002Fpasskey\";\n\nexport default defineCms({\n  \u002F\u002F ...\n  auth: {\n    plugins: [passkey()],\n  },\n});\n",[499,796,797,823,829,841,845,853,872,877],{"__ignoreMap":670},[674,798,799,802,804,807,810,813,816,818,821],{"class":676,"line":677},[674,800,801],{"class":680},"import",[674,803,727],{"class":695},[674,805,806],{"class":691}," passkey",[674,808,809],{"class":695}," }",[674,811,812],{"class":680}," from",[674,814,815],{"class":695}," \"",[674,817,617],{"class":787},[674,819,820],{"class":695},"\"",[674,822,757],{"class":695},[674,824,825],{"class":676,"line":699},[674,826,828],{"emptyLinePlaceholder":827},true,"\n",[674,830,831,833,835,837,839],{"class":676,"line":706},[674,832,681],{"class":680},[674,834,684],{"class":680},[674,836,688],{"class":687},[674,838,692],{"class":691},[674,840,696],{"class":695},[674,842,843],{"class":676,"line":719},[674,844,703],{"class":702},[674,846,847,849,851],{"class":676,"line":742},[674,848,710],{"class":709},[674,850,713],{"class":695},[674,852,716],{"class":695},[674,854,855,858,860,863,866,869],{"class":676,"line":748},[674,856,857],{"class":709},"    plugins",[674,859,713],{"class":695},[674,861,862],{"class":691}," [",[674,864,865],{"class":687},"passkey",[674,867,868],{"class":691},"()]",[674,870,871],{"class":695},",\n",[674,873,875],{"class":676,"line":874},7,[674,876,745],{"class":695},[674,878,880,882,884],{"class":676,"line":879},8,[674,881,751],{"class":695},[674,883,754],{"class":691},[674,885,757],{"class":695},[887,888,889,900,906],"ul",{},[523,890,891,892,895,896,899],{},"Users add passkeys in ",[540,893,894],{},"Account settings",". ",[540,897,898],{},"Sign in with a passkey"," needs no email.",[523,901,902,903,518],{},"When the admin runs on a subdomain of the site, pass the site's domain: ",[499,904,905],{},"passkey({ rpID: \"example.com\" })",[523,907,908],{},"The plugin is off by default because it adds about 600 KiB to the server bundle.",[654,910,911,914,1025],{"label":622},[484,912,913],{},"A magic link is a sign-in link in an email. It is valid for 5 minutes:",[664,915,917],{"className":666,"code":916,"filename":668,"language":669,"meta":670,"style":670},"import { magicLink } from \"tenoncms\u002Fauth\";\n\nexport default defineCms({\n  \u002F\u002F ...\n  auth: {\n    plugins: [magicLink()],\n  },\n  email: { adapter, from: \"Site \u003Chello@example.com>\" },\n});\n",[499,918,919,941,945,957,961,969,984,988,1016],{"__ignoreMap":670},[674,920,921,923,925,928,930,932,934,937,939],{"class":676,"line":677},[674,922,801],{"class":680},[674,924,727],{"class":695},[674,926,927],{"class":691}," magicLink",[674,929,809],{"class":695},[674,931,812],{"class":680},[674,933,815],{"class":695},[674,935,936],{"class":787},"tenoncms\u002Fauth",[674,938,820],{"class":695},[674,940,757],{"class":695},[674,942,943],{"class":676,"line":699},[674,944,828],{"emptyLinePlaceholder":827},[674,946,947,949,951,953,955],{"class":676,"line":706},[674,948,681],{"class":680},[674,950,684],{"class":680},[674,952,688],{"class":687},[674,954,692],{"class":691},[674,956,696],{"class":695},[674,958,959],{"class":676,"line":719},[674,960,703],{"class":702},[674,962,963,965,967],{"class":676,"line":742},[674,964,710],{"class":709},[674,966,713],{"class":695},[674,968,716],{"class":695},[674,970,971,973,975,977,980,982],{"class":676,"line":748},[674,972,857],{"class":709},[674,974,713],{"class":695},[674,976,862],{"class":691},[674,978,979],{"class":687},"magicLink",[674,981,868],{"class":691},[674,983,871],{"class":695},[674,985,986],{"class":676,"line":874},[674,987,745],{"class":695},[674,989,990,993,995,997,1000,1003,1005,1007,1009,1012,1014],{"class":676,"line":879},[674,991,992],{"class":709},"  email",[674,994,713],{"class":695},[674,996,727],{"class":695},[674,998,999],{"class":691}," adapter",[674,1001,1002],{"class":695},",",[674,1004,812],{"class":709},[674,1006,713],{"class":695},[674,1008,815],{"class":695},[674,1010,1011],{"class":787},"Site \u003Chello@example.com>",[674,1013,820],{"class":695},[674,1015,739],{"class":695},[674,1017,1019,1021,1023],{"class":676,"line":1018},9,[674,1020,751],{"class":695},[674,1022,754],{"class":691},[674,1024,757],{"class":695},[484,1026,1027],{},"The link goes only to existing users. For an unknown address, the page answers the same, but sends nothing.",[654,1029,1030,1033],{"label":638},[484,1031,1032],{},"An email code is a 6-digit code in an email:",[664,1034,1036],{"className":666,"code":1035,"filename":668,"language":669,"meta":670,"style":670},"import { emailOTP } from \"tenoncms\u002Fauth\";\n\nexport default defineCms({\n  \u002F\u002F ...\n  auth: {\n    plugins: [emailOTP({ otpLength: 8 })],\n  },\n  email: { adapter, from: \"Site \u003Chello@example.com>\" },\n});\n",[499,1037,1038,1059,1063,1075,1079,1087,1118,1122,1146],{"__ignoreMap":670},[674,1039,1040,1042,1044,1047,1049,1051,1053,1055,1057],{"class":676,"line":677},[674,1041,801],{"class":680},[674,1043,727],{"class":695},[674,1045,1046],{"class":691}," emailOTP",[674,1048,809],{"class":695},[674,1050,812],{"class":680},[674,1052,815],{"class":695},[674,1054,936],{"class":787},[674,1056,820],{"class":695},[674,1058,757],{"class":695},[674,1060,1061],{"class":676,"line":699},[674,1062,828],{"emptyLinePlaceholder":827},[674,1064,1065,1067,1069,1071,1073],{"class":676,"line":706},[674,1066,681],{"class":680},[674,1068,684],{"class":680},[674,1070,688],{"class":687},[674,1072,692],{"class":691},[674,1074,696],{"class":695},[674,1076,1077],{"class":676,"line":719},[674,1078,703],{"class":702},[674,1080,1081,1083,1085],{"class":676,"line":742},[674,1082,710],{"class":709},[674,1084,713],{"class":695},[674,1086,716],{"class":695},[674,1088,1089,1091,1093,1095,1098,1100,1103,1106,1108,1111,1113,1116],{"class":676,"line":748},[674,1090,857],{"class":709},[674,1092,713],{"class":695},[674,1094,862],{"class":691},[674,1096,1097],{"class":687},"emailOTP",[674,1099,692],{"class":691},[674,1101,1102],{"class":695},"{",[674,1104,1105],{"class":709}," otpLength",[674,1107,713],{"class":695},[674,1109,1110],{"class":735}," 8",[674,1112,809],{"class":695},[674,1114,1115],{"class":691},")]",[674,1117,871],{"class":695},[674,1119,1120],{"class":676,"line":874},[674,1121,745],{"class":695},[674,1123,1124,1126,1128,1130,1132,1134,1136,1138,1140,1142,1144],{"class":676,"line":879},[674,1125,992],{"class":709},[674,1127,713],{"class":695},[674,1129,727],{"class":695},[674,1131,999],{"class":691},[674,1133,1002],{"class":695},[674,1135,812],{"class":709},[674,1137,713],{"class":695},[674,1139,815],{"class":695},[674,1141,1011],{"class":787},[674,1143,820],{"class":695},[674,1145,739],{"class":695},[674,1147,1148,1150,1152],{"class":676,"line":1018},[674,1149,751],{"class":695},[674,1151,754],{"class":691},[674,1153,757],{"class":695},[887,1155,1156,1162,1173,1184,1194],{},[523,1157,1158,1161],{},[499,1159,1160],{},"npm create tenoncms"," asks which methods to use and writes this config for you.",[523,1163,1164,1166,1167,1169,1170,1172],{},[499,1165,627],{}," and ",[499,1168,643],{}," from ",[499,1171,936],{}," are better-auth's plugins with sign-up turned off, so they only sign in existing users.",[523,1174,1175,1176,1166,1178,1181,1182,518],{},"They send the built-in ",[499,1177,979],{},[499,1179,1180],{},"emailOtp"," emails. To change them, see ",[491,1183,249],{"href":250},[523,1185,1186,1187,1190,1191,518],{},"A user keeps their password and sessions after their first magic link. Every user that Tenon creates counts as verified: the first admin, an invited user, and a user from ",[499,1188,1189],{},"cms.users.create()"," or ",[499,1192,1193],{},"tenon users create",[523,1195,1196],{},"Without email, magic links and email codes are off. Tenon warns at startup when they are the only methods.",[1198,1199,1200],"warning",{},"Tenon does not start without a sign-in method. When you turn passwords off, add at least one other method.",[1202,1203,1205],"h3",{"id":1204},"without-a-password","Without a password",[484,1207,1208,1209,1212],{},"With ",[499,1210,1211],{},"emailAndPassword: { enabled: false }",", a new account needs only a name and an email:",[520,1214,1215,1218,1225],{},[523,1216,1217],{},"The first admin, or an invited user, enters a name and an email.",[523,1219,1220,1221,1224],{},"The admin asks ",[540,1222,1223],{},"How do you want to sign in?"," The user creates a passkey, or continues by email when a magic link or an email code is on.",[523,1226,1227],{},"Next time, the user signs in with that method.",[484,1229,1230,1231,518],{},"A user who leaves before creating a passkey, and has no email method, signs in again with ",[491,1232,1234],{"href":1233},"#recovery","recovery",[508,1236,894],{"id":1237},"account-settings",[484,1239,1240,1242],{},[540,1241,894],{}," in the user menu lets each user:",[887,1244,1245,1248,1251],{},[523,1246,1247],{},"change their name, the admin's language and their time zone. Dates in the admin follow the time zone.",[523,1249,1250],{},"change their password, or set a first one. This signs out their other sessions.",[523,1252,1253],{},"add and remove passkeys, when passkeys are on.",[484,1255,1256],{},"A user cannot remove their last passkey while it is their only way to sign in.",[508,1258,1259],{"id":1234},"Recovery",[484,1261,1262,1264],{},[540,1263,762],{}," sends a reset link by email. When that does not help, for example because email is not set up or the last passkey is lost, run this in the project:",[664,1266,1268],{"className":774,"code":1267,"language":776,"meta":670,"style":670},"npx tenon users recover anna@example.com\n",[499,1269,1270],{"__ignoreMap":670},[674,1271,1272,1275,1278,1281,1284],{"class":676,"line":677},[674,1273,1274],{"class":783},"npx",[674,1276,1277],{"class":787}," tenon",[674,1279,1280],{"class":787}," users",[674,1282,1283],{"class":787}," recover",[674,1285,1286],{"class":787}," anna@example.com\n",[484,1288,1289],{},"It prints a sign-in link, and also emails it when email is set up. It needs no session, only the database.",[887,1291,1292,1295,1301],{},[523,1293,1294],{},"The link works once and expires after an hour.",[523,1296,1297,1298,1300],{},"It signs the user out everywhere else, signs them in, and opens ",[540,1299,894],{}," to set a new password or add a passkey.",[523,1302,1303,1304,1307],{},"In server code, ",[499,1305,1306],{},"cms.users.signInLink(email, { origin })"," returns the same link.",[484,1309,1310,1311,1313],{},"See ",[491,1312,463],{"href":464}," for the other user commands.",[508,1315,1317],{"id":1316},"auth-options","Auth options",[484,1319,1320,1322,1323,1326,1327,1166,1330,1333],{},[499,1321,501],{}," passes better-auth's options through. Tenon sets ",[499,1324,1325],{},"database",", ",[499,1328,1329],{},"basePath",[499,1331,1332],{},"secret"," itself.",[664,1335,1337],{"className":666,"code":1336,"filename":668,"language":669,"meta":670,"style":670},"import { twoFactor } from \"better-auth\u002Fplugins\";\n\nexport default defineCms({\n  \u002F\u002F ...\n  auth: {\n    session: { expiresIn: 60 * 60 * 24 * 30 },\n    plugins: [twoFactor()],\n  },\n});\n",[499,1338,1339,1361,1365,1377,1381,1389,1423,1438,1442],{"__ignoreMap":670},[674,1340,1341,1343,1345,1348,1350,1352,1354,1357,1359],{"class":676,"line":677},[674,1342,801],{"class":680},[674,1344,727],{"class":695},[674,1346,1347],{"class":691}," twoFactor",[674,1349,809],{"class":695},[674,1351,812],{"class":680},[674,1353,815],{"class":695},[674,1355,1356],{"class":787},"better-auth\u002Fplugins",[674,1358,820],{"class":695},[674,1360,757],{"class":695},[674,1362,1363],{"class":676,"line":699},[674,1364,828],{"emptyLinePlaceholder":827},[674,1366,1367,1369,1371,1373,1375],{"class":676,"line":706},[674,1368,681],{"class":680},[674,1370,684],{"class":680},[674,1372,688],{"class":687},[674,1374,692],{"class":691},[674,1376,696],{"class":695},[674,1378,1379],{"class":676,"line":719},[674,1380,703],{"class":702},[674,1382,1383,1385,1387],{"class":676,"line":742},[674,1384,710],{"class":709},[674,1386,713],{"class":695},[674,1388,716],{"class":695},[674,1390,1391,1394,1396,1398,1401,1403,1406,1409,1411,1413,1416,1418,1421],{"class":676,"line":748},[674,1392,1393],{"class":709},"    session",[674,1395,713],{"class":695},[674,1397,727],{"class":695},[674,1399,1400],{"class":709}," expiresIn",[674,1402,713],{"class":695},[674,1404,1405],{"class":735}," 60",[674,1407,1408],{"class":695}," *",[674,1410,1405],{"class":735},[674,1412,1408],{"class":695},[674,1414,1415],{"class":735}," 24",[674,1417,1408],{"class":695},[674,1419,1420],{"class":735}," 30",[674,1422,739],{"class":695},[674,1424,1425,1427,1429,1431,1434,1436],{"class":676,"line":874},[674,1426,857],{"class":709},[674,1428,713],{"class":695},[674,1430,862],{"class":691},[674,1432,1433],{"class":687},"twoFactor",[674,1435,868],{"class":691},[674,1437,871],{"class":695},[674,1439,1440],{"class":676,"line":879},[674,1441,745],{"class":695},[674,1443,1444,1446,1448],{"class":676,"line":1018},[674,1445,751],{"class":695},[674,1447,754],{"class":691},[674,1449,757],{"class":695},[1202,1451,1453],{"id":1452},"the-cms-origin","The CMS origin",[484,1455,1456],{},"Sign-in, invites, password resets and every link into the admin need the origin of the CMS:",[887,1458,1459,1477,1493],{},[523,1460,1461,1464,1465,1468,1469,1472,1473,518],{},[540,1462,1463],{},"The same origin as the site",": set ",[499,1466,1467],{},"site.url"," in production. It is the default of ",[499,1470,1471],{},"auth.baseURL",". See ",[491,1474,1476],{"href":1475},"\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fconfiguration#site-url","Site URL",[523,1478,1479,1482,1483,1486,1487,1489,1490,518],{},[540,1480,1481],{},"Another origin",", like ",[499,1484,1485],{},"cms.example.com",": also set ",[499,1488,1471],{}," to that origin, without a path. For drafts and the admin bar on the site, also share the cookies. See ",[491,1491,163],{"href":1492},"\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fheadless#share-the-cookies",[523,1494,1495,1498,1499,1502],{},[540,1496,1497],{},"More than one host",", like a preview domain: list them in ",[499,1500,1501],{},"allowedHosts",", with a fallback for links that Tenon sends without a request.",[664,1504,1506],{"className":666,"code":1505,"language":669,"meta":670,"style":670},"auth: {\n  baseURL: {\n    allowedHosts: [\"cms.example.com\", \"preview.example.com\"],\n    fallback: \"https:\u002F\u002Fcms.example.com\",\n  },\n},\n",[499,1507,1508,1516,1525,1554,1570,1574],{"__ignoreMap":670},[674,1509,1510,1512,1514],{"class":676,"line":677},[674,1511,501],{"class":783},[674,1513,713],{"class":695},[674,1515,716],{"class":695},[674,1517,1518,1521,1523],{"class":676,"line":699},[674,1519,1520],{"class":783},"  baseURL",[674,1522,713],{"class":695},[674,1524,716],{"class":695},[674,1526,1527,1530,1532,1534,1536,1538,1540,1542,1544,1547,1549,1552],{"class":676,"line":706},[674,1528,1529],{"class":783},"    allowedHosts",[674,1531,713],{"class":695},[674,1533,862],{"class":709},[674,1535,820],{"class":695},[674,1537,1485],{"class":787},[674,1539,820],{"class":695},[674,1541,1002],{"class":695},[674,1543,815],{"class":695},[674,1545,1546],{"class":787},"preview.example.com",[674,1548,820],{"class":695},[674,1550,1551],{"class":709},"]",[674,1553,871],{"class":695},[674,1555,1556,1559,1561,1563,1566,1568],{"class":676,"line":719},[674,1557,1558],{"class":783},"    fallback",[674,1560,713],{"class":695},[674,1562,815],{"class":695},[674,1564,1565],{"class":787},"https:\u002F\u002Fcms.example.com",[674,1567,820],{"class":695},[674,1569,871],{"class":695},[674,1571,1572],{"class":676,"line":742},[674,1573,745],{"class":695},[674,1575,1576],{"class":676,"line":748},[674,1577,1578],{"class":695},"},\n",[484,1580,1581],{},"List only hosts you control. In development, no URL is needed: Tenon uses the URL of the dev server.",[1202,1583,1585],{"id":1584},"sessions-and-rate-limits","Sessions and rate limits",[887,1587,1588,1599],{},[523,1589,1590,1593,1594,518],{},[499,1591,1592],{},"session"," sets how long a session lasts. See ",[491,1595,1598],{"href":1596,"rel":1597},"https:\u002F\u002Fbetter-auth.com\u002Fdocs\u002Fconcepts\u002Fsession-management",[495],"Session management",[523,1600,1601,1604],{},[499,1602,1603],{},"rateLimit"," limits sign-in attempts. Tenon stores the counts in the database, because serverless functions do not share memory.",[1202,1606,1608],{"id":1607},"your-own-better-auth-plugins","Your own better-auth plugins",[484,1610,1611,1612,1615],{},"Plugins in ",[499,1613,1614],{},"auth.plugins"," run like in any better-auth app. Their tables are created on the first request.",[887,1617,1618,1621],{},[523,1619,1620],{},"The admin has screens for the four sign-in methods above and for password reset. Other plugins that need screens, like two-factor sign-in, work on the server only.",[523,1622,1623,1624,1627,1628,1630,1631,1633],{},"Core adds better-auth's ",[499,1625,1626],{},"admin()"," plugin for user management. Your own ",[499,1629,1626],{}," in ",[499,1632,1614],{}," replaces it.",[1202,1635,1637],{"id":1636},"run-code-on-sign-in","Run code on sign-in",[484,1639,1640],{},"better-auth's hooks run on its routes. For example, after each email sign-in:",[664,1642,1644],{"className":666,"code":1643,"language":669,"meta":670,"style":670},"import { createAuthMiddleware } from \"better-auth\u002Fapi\";\n\nauth: {\n  hooks: {\n    after: createAuthMiddleware(async (ctx) => {\n      if (ctx.path === \"\u002Fsign-in\u002Femail\") console.log(\"signed in\");\n    }),\n  },\n},\n",[499,1645,1646,1668,1672,1680,1689,1718,1766,1775,1779],{"__ignoreMap":670},[674,1647,1648,1650,1652,1655,1657,1659,1661,1664,1666],{"class":676,"line":677},[674,1649,801],{"class":680},[674,1651,727],{"class":695},[674,1653,1654],{"class":691}," createAuthMiddleware",[674,1656,809],{"class":695},[674,1658,812],{"class":680},[674,1660,815],{"class":695},[674,1662,1663],{"class":787},"better-auth\u002Fapi",[674,1665,820],{"class":695},[674,1667,757],{"class":695},[674,1669,1670],{"class":676,"line":699},[674,1671,828],{"emptyLinePlaceholder":827},[674,1673,1674,1676,1678],{"class":676,"line":706},[674,1675,501],{"class":783},[674,1677,713],{"class":695},[674,1679,716],{"class":695},[674,1681,1682,1685,1687],{"class":676,"line":719},[674,1683,1684],{"class":783},"  hooks",[674,1686,713],{"class":695},[674,1688,716],{"class":695},[674,1690,1691,1694,1696,1698,1700,1704,1707,1711,1713,1716],{"class":676,"line":742},[674,1692,1693],{"class":783},"    after",[674,1695,713],{"class":695},[674,1697,1654],{"class":687},[674,1699,692],{"class":709},[674,1701,1703],{"class":1702},"spNyl","async",[674,1705,1706],{"class":695}," (",[674,1708,1710],{"class":1709},"sHdIc","ctx",[674,1712,754],{"class":695},[674,1714,1715],{"class":1702}," =>",[674,1717,716],{"class":695},[674,1719,1720,1723,1725,1727,1729,1732,1735,1737,1740,1742,1745,1748,1750,1753,1755,1757,1760,1762,1764],{"class":676,"line":748},[674,1721,1722],{"class":680},"      if",[674,1724,1706],{"class":709},[674,1726,1710],{"class":691},[674,1728,518],{"class":695},[674,1730,1731],{"class":691},"path",[674,1733,1734],{"class":695}," ===",[674,1736,815],{"class":695},[674,1738,1739],{"class":787},"\u002Fsign-in\u002Femail",[674,1741,820],{"class":695},[674,1743,1744],{"class":709},") ",[674,1746,1747],{"class":691},"console",[674,1749,518],{"class":695},[674,1751,1752],{"class":687},"log",[674,1754,692],{"class":709},[674,1756,820],{"class":695},[674,1758,1759],{"class":787},"signed in",[674,1761,820],{"class":695},[674,1763,754],{"class":709},[674,1765,757],{"class":695},[674,1767,1768,1771,1773],{"class":676,"line":874},[674,1769,1770],{"class":695},"    }",[674,1772,754],{"class":709},[674,1774,871],{"class":695},[674,1776,1777],{"class":676,"line":879},[674,1778,745],{"class":695},[674,1780,1781],{"class":676,"line":1018},[674,1782,1578],{"class":695},[484,1784,1785,1788,1789,1792],{},[499,1786,1787],{},"databaseHooks"," run when a user, a session or an account is written, like ",[499,1790,1791],{},"databaseHooks.user.create.after"," for a welcome email. Tenon's own check runs before your hooks:",[887,1794,1795,1798],{},[523,1796,1797],{},"The first user is always an admin, whatever role your hook returns.",[523,1799,1800],{},"A request that creates a later user needs the session of an admin. Server code without a request may create users.",[508,1802,1804],{"id":1803},"your-own-sign-in-form","Your own sign-in form",[484,1806,1807],{},"The client has the sign-in calls for a form of your own, outside the admin:",[555,1809,1810,1820],{},[558,1811,1812],{},[561,1813,1814,1817],{},[564,1815,1816],{},"Call",[564,1818,1819],{},"Does",[577,1821,1822,1832,1842,1852,1862,1872,1882],{},[561,1823,1824,1829],{},[582,1825,1826],{},[499,1827,1828],{},"client.signIn({ email, password })",[582,1830,1831],{},"Signs in with a password",[561,1833,1834,1839],{},[582,1835,1836],{},[499,1837,1838],{},"client.signInMagicLink({ email, callbackURL })",[582,1840,1841],{},"Sends a magic link",[561,1843,1844,1849],{},[582,1845,1846],{},[499,1847,1848],{},"client.sendSignInCode({ email })",[582,1850,1851],{},"Sends an email code",[561,1853,1854,1859],{},[582,1855,1856],{},[499,1857,1858],{},"client.signInWithCode({ email, otp })",[582,1860,1861],{},"Signs in with the code",[561,1863,1864,1869],{},[582,1865,1866],{},[499,1867,1868],{},"client.requestPasswordReset({ email, redirectTo })",[582,1870,1871],{},"Sends a reset link to your form",[561,1873,1874,1879],{},[582,1875,1876],{},[499,1877,1878],{},"client.resetPassword({ token, newPassword })",[582,1880,1881],{},"Sets the new password",[561,1883,1884,1889],{},[582,1885,1886],{},[499,1887,1888],{},"client.signOut()",[582,1890,1891],{},"Signs out",[484,1893,1894,1897,1898,518],{},[499,1895,1896],{},"GET \u002F_tenon\u002Fauth-status"," tells the form which methods are on: ",[499,1899,1900],{},"{ setup, signUp, password, passkeys, magicLink, emailOtp, emailOtpLength }",[508,1902,1904],{"id":1903},"related-resources","Related resources",[887,1906,1907,1913,1919,1924,1929],{},[523,1908,1909,1912],{},[491,1910,1911],{"href":206},"Access control",": roles, invites and rules.",[523,1914,1915,1918],{},[491,1916,1917],{"href":210},"API keys",": access for scripts and other services.",[523,1920,1921,1923],{},[491,1922,249],{"href":250},": set up email for resets, invites and sign-in links.",[523,1925,1926,1928],{},[491,1927,463],{"href":464},": create, recover and remove users from the command line.",[523,1930,1931,1936,1937,518],{},[491,1932,1935],{"href":1933,"rel":1934},"https:\u002F\u002Fbetter-auth.com\u002Fdocs",[495],"better-auth docs",": all options of ",[499,1938,501],{},[1940,1941,1942],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}",{"title":670,"searchDepth":699,"depth":699,"links":1944},[1945,1946,1949,1950,1951,1957,1958],{"id":510,"depth":699,"text":511},{"id":549,"depth":699,"text":550,"children":1947},[1948],{"id":1204,"depth":706,"text":1205},{"id":1237,"depth":699,"text":894},{"id":1234,"depth":699,"text":1259},{"id":1316,"depth":699,"text":1317,"children":1952},[1953,1954,1955,1956],{"id":1452,"depth":706,"text":1453},{"id":1584,"depth":706,"text":1585},{"id":1607,"depth":706,"text":1608},{"id":1636,"depth":706,"text":1637},{"id":1803,"depth":699,"text":1804},{"id":1903,"depth":699,"text":1904},"How people sign in to the admin, and the methods to pick from.","md",null,{},{"title":201,"description":1959},"fJDpQxW1Y6pzwn__ewYM8LxK-rjxMzCE1PqWvwywZZY",[1966,1968],{"title":192,"path":193,"stem":194,"description":1967,"children":-1},"Editors see changes on the real page while they type.",{"title":205,"path":206,"stem":207,"description":1969,"children":-1},"Roles, rules and API keys.",1795884682602]