Guides
Production Launch Checklist
Hardening AuthCore for production comes down to configuration, monitoring, and drills. Work through the sections below before pushing your new authentication stack live.
Environment variables
Keep secrets outside git and prefer per-environment overrides (.env.production
, CI variables, or secret managers). Double-check the following values in staging before promotion.
- • Rotate
NEXTAUTH_SECRET
when cloning databases. - • Use provider-specific SMTP API keys (SendGrid, Postmark, Resend) instead of personal passwords.
- • Point
DATABASE_URL
to a managed MySQL/Postgres instance with backups enabled.
Authentication flows
Generate production OAuth credentials (Google, Microsoft, GitHub) and wire them into NextAuth if you plan to support SSO. Test password reset and email verification with your real SMTP provider.
Security posture
Enable account lockout, disposable email blocking, and user enumeration protection. Tighten password policy to match your compliance requirements.
Pair this with a SIEM alert when lockoutPolicy.enabled
is toggled off so you never miss an unexpected relaxation.
Monitoring & alerts
Forward key lifecycle events into your observability stack. Start with signIn
, signOut
, session
, and linkAccount
. Attach correlation IDs to trace requests end-to-end.
Use console.log
during development, but send production logs to Datadog, Sentry, OpenTelemetry, or your platform of choice.
Audit trail
Record security mutations to an immutable table. The example below adds a simple audit log row whenever tenant security settings change.
Resilience drills
Run through failure scenarios quarterly: database failover, SMTP outage, compromised account. Document the manual overrides your support team needs to know.
- • Ensure
seed:admin
can restore a super admin quickly. - • Practice revoking API tokens and resetting 2FA for users locked out of their devices.
- • Schedule backup restores in staging to validate snapshots.