feat(website): crosscode website.sh and signing in through Accounts
crosscode: scripts/products/website.sh (ports 5300/3300, uploads in the export), crosscode add <church> website (needs Accounts; www.<address> or the Cross Code address), one install_app for Accounts and the Website, env template copy, bats tests. Backend: Hub client (protocol v2, product website), crosscode.link/1 with automatic connect to the church's Accounts, sign-in through @crosscode/auth-client with the Website's own session and roles, the first Owner from HUB_ADMIN_EMAIL (verified), 2FA for Owners and Admins, back-channel logout, Accounts' user.* calls, and the church export. Frontend: admin sign-in/out and the sign-in problem page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ CROSSCODE_REPO="${CROSSCODE_REPO:-https://c-git.crosscode.co.za/joshua/crosscode
|
||||
# through it.
|
||||
PRODUCT_ORDER=(accounts events website app)
|
||||
# Products this version of the script can deploy (a products/<name>.sh exists for each).
|
||||
SUPPORTED_PRODUCTS=(accounts events)
|
||||
SUPPORTED_PRODUCTS=(accounts events website)
|
||||
# Releases older than this get a warning; older than CROSSCODE_NODE_MIN the deploy is refused.
|
||||
CROSSCODE_NODE_MIN=20
|
||||
CROSSCODE_NODE_WARN=22
|
||||
@@ -358,8 +358,8 @@ node_major() { node -p 'process.versions.node.split(".")[0]' 2>/dev/null || echo
|
||||
# 1.0–1.1 has no .gitignore for its ecosystem.config.cjs). Nor do the files in the folders this
|
||||
# script writes into (Accounts below 1.3.0 doesn't ignore the database dumps made before each
|
||||
# deploy, so the dump would stop the very deploy that brings the .gitignore).
|
||||
CROSSCODE_OWN_FILES=(apps/events/ecosystem.config.js apps/accounts/ecosystem.config.cjs)
|
||||
CROSSCODE_OWN_DIRS=(apps/accounts/backend/backups/)
|
||||
CROSSCODE_OWN_FILES=(apps/events/ecosystem.config.js apps/accounts/ecosystem.config.cjs apps/website/ecosystem.config.cjs)
|
||||
CROSSCODE_OWN_DIRS=(apps/accounts/backend/backups/ apps/website/backend/backups/)
|
||||
local_changes() {
|
||||
git_in "$1" status --porcelain --untracked-files=all |
|
||||
awk -v own="${CROSSCODE_OWN_FILES[*]}" -v dirs="${CROSSCODE_OWN_DIRS[*]}" '
|
||||
|
||||
Reference in New Issue
Block a user