feat(identity): confirm registration email atomically

This commit is contained in:
TakuyaYagam1 committed 2026-10-07 09:12:15 +03:00
1 parent 8e7ce8d71c
commit fade4e76e4
75 files changed
+4188 -403

No files matched your search

+12 -6
View File
@@ -45,7 +45,9 @@ EMAIL_TIMEOUT=10s
# mail wait for the reset; nothing buys a plan or switches the transport.
EMAIL_QUOTA_DAILY=
EMAIL_QUOTA_MONTHLY=
# Public origin for links in mail: https, or http only for a loopback host.
# Public origin for links in mail. Email confirmation requires the browser's
# Origin header to match this scheme, host, and port. Use HTTPS except on
# localhost, 127.0.0.1, or [::1]. Do not add a path, query, or fragment.
APP_PUBLIC_URL=http://localhost:8080
# Read only when EMAIL_PROVIDER=resend, where it is required. Keep the real
# key in the server environment only; it is never logged.
@@ -68,17 +70,21 @@ PASSWORD_HASH_CONCURRENCY=1
# two together if the range collides with another network or route.
APP_SUBNET=172.29.79.0/24
APP_FRONTEND_IP=172.29.79.10
# Registration. IDENTITY_KEY_SECRET is required: it keys the idempotency
# records and the rate limit counters, so a restart or another instance keeps
# them. At least 32 bytes. There is no usable example value: leave it empty
# here and generate one for every deployment (Compose refuses an empty value):
# Registration and email confirmation. IDENTITY_KEY_SECRET is required. It
# keys idempotency records and rate-limit counters across restarts and instances.
# Use at least 32 bytes. There is no usable example value: leave it empty here
# and generate one for every deployment (Compose refuses an empty value):
# openssl rand -base64 48
# A value that starts with replace-this is refused. Without it the backend refuses to start, unless a development stand sets
# IDENTITY_ALLOW_EPHEMERAL_KEY=true (a random secret per process).
IDENTITY_KEY_SECRET=
# The limits count the registration and every verification resend per address.
# Registration and every verification resend count toward both per-address limits.
VERIFICATION_MAIL_MIN_INTERVAL=1m
VERIFICATION_MAIL_DAILY_LIMIT=5
# Confirmation attempts are limited to 5 per token per hour by the service.
# This token limit is fixed; it has no environment setting.
# IDENTITY_CLIENT_HOURLY_LIMIT applies to registration, resends, and
# confirmations per resolved client address per hour, when available.
IDENTITY_CLIENT_HOURLY_LIMIT=30
# Reverse proxies the backend trusts to report the client address in