Authentication
The Bukinistika experiment mounts Better Auth on its SvelteKit auth route. Its kinetic/users.kinetic imports the shared account models.
import "../node_modules/@kinetic/cms/auth.kinetic"Set KINETIC_AUTH_URL to the site origin and KINETIC_AUTH_SECRET to a persistent secret of at least 32 characters. Configure email and password under auth.emailAndPassword in kinetic.config.ts. For GitHub, register the callback https://your-site.example/api/auth/callback/github and set KINETIC_GITHUB_CLIENT_ID and KINETIC_GITHUB_CLIENT_SECRET.
Give an account CMS access
Section titled “Give an account CMS access”Start the disposable demo with authentication enabled.
export KINETIC_AUTH_URL=http://127.0.0.1:4284export KINETIC_AUTH_SECRET="$(openssl rand -hex 32)"bun run devCreate a test account in the disposable demo. Its sign-in should succeed, and opening /admin should return 403. In the demo database, grant the account the CMS role and reload the page.
UPDATE "KineticAuthUser"SET "cmsRole" = 'admin'WHERE "email" = 'owner@example.test';The same account should now open the CMS and see Users when account creation is available. Use a trusted admin workflow to grant roles on a deployed site.
Control registration
Section titled “Control registration”Open Settings, then System. Turn off Public signup to close new email and OAuth registrations. Turn off Admin account creation to prevent admins from adding accounts in the CMS. Existing accounts can keep signing in. The Users link is hidden when both creation paths are unavailable. An admin can still open /admin/users directly.
When adding auth to an existing database, review and apply the migration before enabling it in the app.