# 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

```text
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.
```

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

---
Source: [Agentic Makers](https://agenticmakers.app/en/help/logins-fail-on-preview) · License: CC BY 4.0
