Add local Pinscope multi-user auth for shared projects.

Self-host email/password accounts enable the existing collaborator
invite flow without Clerk; first admin inherits users/local projects.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-11 14:31:37 +02:00
co-authored by Cursor
parent c5b260b404
commit 5a69b380da
22 changed files with 1045 additions and 116 deletions
+7
View File
@@ -118,6 +118,13 @@ upsert_env NEXT_PUBLIC_API_URL "$SITE" .env
# JSON list — keep it a single line so docker compose / pydantic-settings parse it.
upsert_env CORS_ORIGINS "[\"$SITE\"]" .env
# Self-host multi-user auth (Pinscope accounts). Generate a secret once if missing.
if [[ -z "$(read_env AUTH_JWT_SECRET .env || true)" ]]; then
log "Generating AUTH_JWT_SECRET for local multi-user auth"
upsert_env AUTH_JWT_SECRET "$(openssl rand -hex 32)" .env
fi
upsert_env NEXT_PUBLIC_AUTH_MODE "local" .env
KEY="$(read_env DEEPSEEK_API_KEY .env || true)"
if [[ -z "$KEY" || "$KEY" == "sk-..." ]]; then
die "Set a real DEEPSEEK_API_KEY in $ROOT/.env before updating."