Skip to content

fix: add NEXT_PUBLIC_MARKETING_URL to API deployments - #644

Merged
saddlepaddle merged 1 commit into
mainfrom
fix/better-auth-trusted-origins
Jan 7, 2026
Merged

saddlepaddle merged 1 commit into
mainfrom
fix/better-auth-trusted-origins

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Jan 7, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes Better Auth trusted origins error by adding missing NEXT_PUBLIC_MARKETING_URL to both preview and production API deployment workflows.

The auth package requires all 4 URLs in trustedOrigins: WEB, API, MARKETING, and ADMIN. The API deployments were missing MARKETING_URL, causing Better Auth to reject it as an invalid origin.

Summary by CodeRabbit

  • Chores
    • Enhanced deployment workflows to ensure marketing URL configuration is correctly applied across preview and production environments.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 7, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The changes propagate a marketing URL environment variable (NEXT_PUBLIC_MARKETING_URL) through deployment workflows. In both preview and production deployment files, the variable is added to the API deployment environment and passed to Vercel deploy commands using the corresponding environment value.

Changes

Cohort / File(s) Summary
Deploy Workflow Environment Propagation
.github/workflows/deploy-preview.yml, .github/workflows/deploy-production.yml
Add NEXT_PUBLIC_MARKETING_URL environment variable to API deployment environment and Vercel deploy command invocation for both preview and production workflows

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Possibly related PRs

Poem

🐰 A marketing URL hops through the workflow
Environment variables flow, deployment's aglow,
Preview and production, both stages aligned,
Marketing rabbit, so perfectly designed! 🚀✨


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6a725b1 and 6dbc5c2.

📒 Files selected for processing (2)
  • .github/workflows/deploy-preview.yml
  • .github/workflows/deploy-production.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@saddlepaddle
saddlepaddle merged commit 89b7631 into main Jan 7, 2026
11 of 12 checks passed
@github-actions

github-actions Bot commented Jan 7, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

🔗 Preview Links

Service Status Link
Neon Database (Neon) ✅ View Branch
Fly.io Electric (Fly.io) ✅ View App
Vercel API (Vercel) ✅ Open Preview
Vercel Web (Vercel) ✅ Open Preview
Vercel Marketing (Vercel) ✅ Open Preview
Vercel Admin (Vercel) ✅ Open Preview
Vercel Docs (Vercel) ✅ Open Preview

Preview updates automatically with new commits

This branch was previously deployed

1 inactive deployment
preview — 6dbc5c2a Deployed Jan 7, 2026 by saddlepaddle via Deploy Web #759
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.

1 participant