81e454d86d
Registration now goes through POST /api/auth/register, which admin-creates the Kratos identity (unverified email, NO auto-sent code). Kratos self-service registration never returns the verification flow id, so the client could never submit the user's code to the right flow; admin creation lets the client own a single verification flow instead. Also surface the live Kratos verified flag and fix Apple audience + team IDs. - kratos.Client.CreateIdentity via admin API; ErrIdentityExists / ErrInvalidCredentials - AuthService.Register + AuthHandler.Register + public POST /api/auth/register/ - CurrentUser overrides stale user_profile.verified with the live Kratos flag; UserRepository.MarkVerified mirrors it back - configmap: additional_id_token_audiences allows the .dev bundle id_token - fix Apple/APNs team id V3PF3M6B6U -> X86BR9WTLD in .env.example + dev init Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
74 lines
2.2 KiB
Bash
74 lines
2.2 KiB
Bash
# Server Settings
|
|
PORT=8000
|
|
DEBUG=true
|
|
ALLOWED_HOSTS=localhost,127.0.0.1
|
|
TIMEZONE=UTC
|
|
SECRET_KEY=your-secret-key-here-change-this-in-production
|
|
|
|
# Database Settings (PostgreSQL)
|
|
POSTGRES_DB=honeydue
|
|
POSTGRES_USER=postgres
|
|
POSTGRES_PASSWORD=change-this-secure-password
|
|
DB_HOST=localhost
|
|
DB_PORT=5432
|
|
DB_SSLMODE=disable
|
|
DB_MAX_OPEN_CONNS=25
|
|
DB_MAX_IDLE_CONNS=10
|
|
DB_MAX_LIFETIME=600s
|
|
|
|
# Redis Settings
|
|
REDIS_URL=redis://localhost:6379/0
|
|
REDIS_DB=0
|
|
|
|
# Email Settings (SMTP)
|
|
EMAIL_HOST=smtp.gmail.com
|
|
EMAIL_PORT=587
|
|
EMAIL_USE_TLS=true
|
|
EMAIL_HOST_USER=your-email@gmail.com
|
|
EMAIL_HOST_PASSWORD=your-app-password
|
|
DEFAULT_FROM_EMAIL=honeyDue <noreply@honeyDue.treytartt.com>
|
|
|
|
# Sign in with Apple
|
|
# APPLE_CLIENT_ID must equal the iOS bundle ID of the build hitting this
|
|
# backend. The Apple identity-token `aud` claim is checked against it
|
|
# (see internal/services/apple_auth.go::verifyAudience). With DEBUG=false
|
|
# an empty value rejects every Apple token.
|
|
# Release builds: com.myhoneydue.honeyDue
|
|
# Debug builds: com.myhoneydue.honeyDue.dev
|
|
APPLE_CLIENT_ID=com.myhoneydue.honeyDue.dev
|
|
APPLE_TEAM_ID=X86BR9WTLD
|
|
|
|
# APNs Settings (iOS Push Notifications)
|
|
# Direct APNs integration - no external push server needed
|
|
APNS_AUTH_KEY_PATH=/path/to/AuthKey_XXXXXX.p8
|
|
APNS_AUTH_KEY_ID=XXXXXXXXXX
|
|
APNS_TEAM_ID=XXXXXXXXXX
|
|
APNS_TOPIC=com.myhoneydue.honeyDue.dev
|
|
APNS_PRODUCTION=false # Set to true for production APNs, false for sandbox
|
|
|
|
# FCM Settings (Android Push Notifications)
|
|
# Direct FCM integration using legacy HTTP API
|
|
FCM_SERVER_KEY=your-firebase-server-key
|
|
|
|
# Worker Settings (Background Jobs - UTC hours)
|
|
TASK_REMINDER_HOUR=14
|
|
OVERDUE_REMINDER_HOUR=15
|
|
DAILY_DIGEST_HOUR=3
|
|
|
|
# Storage Settings (File Uploads)
|
|
STORAGE_UPLOAD_DIR=./uploads
|
|
STORAGE_BASE_URL=/uploads
|
|
STORAGE_MAX_FILE_SIZE=10485760
|
|
STORAGE_ALLOWED_TYPES=image/jpeg,image/png,image/gif,image/webp,application/pdf
|
|
# 64-char hex key for file encryption at rest. Generate with: openssl rand -hex 32
|
|
STORAGE_ENCRYPTION_KEY=
|
|
|
|
# Feature Flags (Kill Switches)
|
|
# Set to false to disable. All default to true (enabled).
|
|
FEATURE_PUSH_ENABLED=true
|
|
FEATURE_EMAIL_ENABLED=true
|
|
FEATURE_WEBHOOKS_ENABLED=true
|
|
FEATURE_ONBOARDING_EMAILS_ENABLED=true
|
|
FEATURE_PDF_REPORTS_ENABLED=true
|
|
FEATURE_WORKER_ENABLED=true
|