# What changed in @polar-sh/better-auth

> 10 changes in @polar-sh/better-auth 2 from its official release notes, upgrade guides and advisories: 7 breaking, 2 new APIs and options. Each one cited. Sources checked 2026-10-19. HTML: https://unstale.sh/npm/@polar-sh/better-auth/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @polar-sh/better-auth 2

### Breaking changes

- The peer dependency now requires Better Auth ^1.7.0. (2.0.0) — [release notes](https://github.com/polarsource/polar/releases/tag/%40polar-sh/better-auth%402.0.0)
- Create the client option with createPolarCore instead of createPolar, importing it from @polar-sh/sdk/2026-10. (2.0.0) — [release notes](https://github.com/polarsource/polar/releases/tag/%40polar-sh/better-auth%402.0.0)
- Existing customers without an external ID retain one-time linking, while conflicting customer identities are rejected rather than replacing an immutable external ID. (2.0.0) — [release notes](https://github.com/polarsource/polar/releases/tag/%40polar-sh/better-auth%402.0.0)
- The relink path now filters to individual customers and throws CONFLICT if a team customer already holds the signup email, preventing its external_id from being overwritten. (2.0.0) — [release notes](https://github.com/polarsource/polar/releases/tag/%40polar-sh/better-auth%402.0.0)
- Custom plugins passed through use now receive a PolarCore and must use standalone SDK functions with it. (2.0.0) — [release notes](https://github.com/polarsource/polar/releases/tag/%40polar-sh/better-auth%402.0.0)
- For client calls to endpoints that also accept a body, pass query parameters through fetchOptions rather than as a top-level query. (2.0.0) — [release notes](https://github.com/polarsource/polar/releases/tag/%40polar-sh/better-auth%402.0.0)
- Anonymous sessions are rejected before their session ID is forwarded as Polar externalCustomerId, preventing orphan meter events. (2.0.0) — [release notes](https://github.com/polarsource/polar/releases/tag/%40polar-sh/better-auth%402.0.0)

### New APIs and options

- Checkout creation now sends the visitor's IP address, resolved with Better Auth's getIP and advanced.ipAddress settings. Set customerIpAddress to resolve it yourself or false to stop sending it. (2.1.0) — [release notes](https://github.com/polarsource/polar/releases/tag/%40polar-sh/better-auth%402.1.0)
- Checkout requests support discount_code, applying it before redirecting or opening embedded checkout; discount codes must be enabled, and discount_id takes precedence. (2.0.0) — [release notes](https://github.com/polarsource/polar/releases/tag/%40polar-sh/better-auth%402.0.0)

### Fixes and other changes

- Signup customers are created after Better Auth inserts the user, with the user ID included in the initial Polar request; rejected before-create hooks skip Polar calls. (2.0.0) — [release notes](https://github.com/polarsource/polar/releases/tag/%40polar-sh/better-auth%402.0.0)
