Files
waseel/environment.d.ts
T
KrikoriosandClaude Fable 5 eceb6b45d5 Fix SMTP delivery, add password reset and user deletion
SMTP:
- Add connection/greeting/socket timeouts so a stalled Gmail
  connection no longer hangs sign-up
- Wrap sendMail in try/catch and fall back to logging the code
- Derive secure from port (465 implicit TLS vs 587 STARTTLS)
- Strip whitespace from the Gmail app password
- Document SMTP_HOST/SMTP_PORT in .env.example and environment.d.ts

Password reset (new):
- POST /(api)/auth/forgot-password emails a 6-digit code and does
  not reveal whether the address is registered
- POST /(api)/auth/reset-password validates the code, sets the new
  password, verifies the email, and signs the user in
- password_reset_codes table added to seed-db.mjs
- "Forgot password?" flow on the mobile sign-in screen

User deletion (new):
- DELETE /(api)/admin/users/[id], owner-only, blocks self-deletion
- Delete button with confirmation on the dashboard Users page

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-23 22:41:41 +03:00

43 lines
1.0 KiB
TypeScript

// This file is needed to support autocomplete for process.env
export {};
declare global {
namespace NodeJS {
interface ProcessEnv {
// self-hosted auth
AUTH_JWT_SECRET: string;
GOOGLE_OAUTH_CLIENT_ID: string;
// postgres db url (self-hosted)
DATABASE_URL: string;
// expo api server url
EXPO_PUBLIC_SERVER_URL: string;
// google oauth client ids
EXPO_PUBLIC_GOOGLE_AUTH_WEB_CLIENT_ID: string;
EXPO_PUBLIC_GOOGLE_AUTH_IOS_CLIENT_ID: string;
EXPO_PUBLIC_GOOGLE_AUTH_ANDROID_CLIENT_ID: string;
// gmail smtp
SMTP_HOST: string;
SMTP_PORT: string;
SMTP_USER: string;
SMTP_PASS: string;
SMTP_FROM: string;
// geoapify api key
EXPO_PUBLIC_GEOAPIFY_API_KEY: string;
// google api key
EXPO_PUBLIC_GOOGLE_API_KEY: string;
// areeba payment gateway
AREEBA_API_BASE_URL: string;
AREEBA_MERCHANT_ID: string;
AREEBA_API_PASSWORD: string;
AREEBA_API_VERSION: string;
}
}
}