-
Notifications
You must be signed in to change notification settings - Fork 0
Auth: Bootstrap admin script #124
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Auth System — Step 5 (Backend)
Create the first admin user (can't use invite flow — no one to invite from).
Implementation:
-
backend/scripts/create-admin.jsCLI script - Usage:
node scripts/create-admin.js --email admin@cafejusto.app --password "..." - Creates user with
adminrole (farm_id = NULL) - Alternatively: auto-create from
BOOTSTRAP_ADMIN_EMAIL+BOOTSTRAP_ADMIN_PASSWORDenv vars if users table is empty on startup - Refuse to run if admin already exists (prevent duplicates)
Depends on: DB migration
Design doc: docs/AUTH.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request