Skip to content

fix: add NEXT_PUBLIC_ADMIN_URL to web deployment for Better Auth trusted origins#646

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

fix: add NEXT_PUBLIC_ADMIN_URL to web deployment for Better Auth trusted origins#646
saddlepaddle merged 1 commit intomainfrom
fix/better-auth-trusted-origins-web

Conversation

@saddlepaddle
Copy link
Copy Markdown
Collaborator

@saddlepaddle saddlepaddle commented Jan 7, 2026

Fixes Better Auth trusted origins error in web app by adding NEXT_PUBLIC_ADMIN_URL to the deployment workflow.

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

This completes the full fix across all apps:

Summary by CodeRabbit

  • Chores
    • Updated deployment configurations to propagate admin environment variables across preview and production environments for all services.

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 7, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The pull request adds NEXT_PUBLIC_ADMIN_URL environment variable propagation to both preview and production deployment workflows. This variable, derived from ADMIN_ALIAS, is exported globally and passed through vercel deploy commands for the API, Web, and Docs pipelines.

Changes

Cohort / File(s) Summary
GitHub Actions Deployment Workflows
.github/workflows/deploy-preview.yml, .github/workflows/deploy-production.yml
Added NEXT_PUBLIC_ADMIN_URL environment variable to global env blocks and propagated through vercel deploy commands across API, Web, and Docs deployment steps. No control-flow modifications.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • #509: Adds NEXT_PUBLIC_API_URL propagation to the same workflow files following an identical pattern
  • #345: Similar environment variable additions to deploy workflows with vercel deploy command wiring

Poem

🐇 A new URL hops into view,
NEXT_PUBLIC_ADMIN travels through,
From preview to prod, it takes flight,
Vercel commands beam it just right!


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 645f486 and b9e41d1.

📒 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 f4ccdfb into main Jan 7, 2026
5 of 6 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 7, 2026

🚀 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

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