Dough Git

clove/authServer

wrangler.jsonc

back to tree

{
	"$schema": "node_modules/wrangler/config-schema.json",
	"name": "auth-server",
	"main": "src/main.ts",
	"compatibility_date": "2026-09-01",
	"compatibility_flags": [
		"nodejs_compat"
	],
	"observability": {
		"logs": {
			"enabled": true,
			"invocation_logs": true
		}
	},
	// The Svelte app (web/), built by Vite into dist/ before every dev/deploy.
	"build": {
		"command": "bun run build",
		"watch_dir": "web"
	},
	// The worker runs first for every request, so pages get the same host check
	// and security headers as the API, then hands non-API paths to the assets.
	// Unknown paths get index.html: the app's router shows the page (or a 404).
	"assets": {
		"directory": "./dist",
		"binding": "ASSETS",
		"run_worker_first": true,
		"not_found_handling": "single-page-application"
	},
	"d1_databases": [
		{
			"binding": "DB",
			"database_name": "auth-server",
			"database_id": "ce757d6d-ac0f-406a-baca-006163b31566",
			"migrations_dir": "migrations"
		}
	],
	// Hourly sweep of expired sessions, codes, tokens and challenges.
	"triggers": {
		"crons": [
			"17 * * * *"
		]
	},
	//"routes": [{ "pattern": "auth.doughmination.gay", "custom_domain": true }],
	"vars": {
		// Public origin of this server. It is the OIDC issuer and the passkey
		// relying party, so it must never change once passkeys are registered.
		"ISSUER": "https://auth.doughmination.gay",
		"SITE_NAME": "Doughmination SSO",
		"REGISTRATION": "open",
		// Sender for verification emails. The domain must be verified in Resend.
		"MAIL_FROM": "Doughmination SSO <[email protected]>",
		"CONTACT_EMAIL": "[email protected]"
	}
	// Secrets (wrangler secret put <NAME>):
	//   KEY_ENCRYPTION_KEY  encrypts signing keys + TOTP secrets at rest
	//   SETUP_TOKEN         unlocks /setup while there are no users yet
	//   RESEND_API_KEY      sends verification emails (optional locally: they're logged instead)
}