1.7 KiB
1.7 KiB
09 — Production dev-login removal gate
Goal
Before the first production deployment, verify that development-only login/test shortcuts cannot be enabled accidentally in production.
Depends on
- 06
- 07
- local dev-login setup in
docs/dev-login.md
Scope
- Review all production env sources:
.env.production.exampledeploy/compose.yaml- any host-level Docker Compose override files
- deployment secrets on the server
- Confirm production does not set:
ENABLE_DEV_LOGIN=trueDEV_LOGIN_EMAILDEV_LOGIN_NAMEDEV_HOUSEHOLD_NAME
- Confirm production Authentik variables are real:
AUTH_OIDC_ISSUERAUTH_OIDC_CLIENT_IDAUTH_OIDC_CLIENT_SECRET
- Build with production-like env and verify
/loginrenders only the SSO login path. - Verify the app still protects private routes without a valid Auth.js session cookie.
- Verify real Authentik login creates the expected user, household membership, default calendars, and default lists.
- Remove any accidental dev users from the production database.
Optional hardening
- Remove
src/lib/dev-login.tsand the Dev login form fromsrc/app/login/page.tsxentirely before first production deployment. - If retaining the code for future local development, keep the current double gate:
NODE_ENV !== "production"ENABLE_DEV_LOGIN=true
Acceptance criteria
- Production env cannot enable Dev login accidentally.
/loginin production does not show Dev login.- Direct dev-login action execution is unavailable in production.
- Real Authentik login works on the production domain.
- No
dev@famapp.localor configured dev-login user exists in production data.