Preview and Production

Logins don't work on Preview links

What you see
Signing in works on your computer or live site, but fails on a Preview link.
Why it happens
Each Preview has its own address. The login setup only trusts the addresses it was told about.
How to fix it
  1. Ask your agent to check the trusted origins and the auth URL for Preview deployments.
  2. It follows the Better Auth security skill to fix it safely.

Message for your agent

Logins fail on Preview links. Check the auth URL and trusted origins for Preview deployments using the better-auth security skill, and explain the fix before applying it.

Tip

How to prevent it: Test logins on the first Preview after adding them.

Still stuck?Report it to your agent, clearly

Hands-on test on Mac and Windows pending · Last reviewed Nov 8, 2026