Skip to content

fix(mailer): use DOMAIN env var for email links - #422

Open
Ronnie434 wants to merge 2 commits into
timwangmusic:masterfrom
Ronnie434:fix/mailer-domain-env
Open

fix(mailer): use DOMAIN env var for email links#422
Ronnie434 wants to merge 2 commits into
timwangmusic:masterfrom
Ronnie434:fix/mailer-domain-env

Conversation

@Ronnie434

Copy link
Copy Markdown
Contributor

Summary

  • Replace hardcoded email verification and password reset URLs in iowrappers/mailer.go with the DOMAIN environment variable
  • Removes environment-specific branching (testing vs production) in favor of a single config-driven approach
  • Falls back to http://localhost:10000 for local development
  • Fix Jest CI to pass with --passWithNoTests

Motivation

The previous implementation had hardcoded URLs (www.unwind.dev for production, testing-vp.herokuapp.com for testing). This made it fragile when deploying to different environments. Using the DOMAIN env var (already used elsewhere for OAuth config) makes it consistent and portable.

Test plan

  • Verify email verification flow works in production
  • Verify password reset flow works in production
  • Confirm localhost fallback works for local development

Replace hardcoded URLs with the DOMAIN environment variable so email
verification and password reset links work across all environments.
Jest exits with code 1 when no test files are found. Adding
--passWithNoTests allows CI to pass until tests are added.

@tim-eternos tim-eternos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants