# `PhoenixKit.Config.EndpointUrlSync`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.164/lib/phoenix_kit/config/endpoint_url_sync.ex#L1)

Syncs the `site_url` from PhoenixKit settings to the parent Phoenix Endpoint's
`:url` configuration.

This ensures `Endpoint.url()` returns the correct public URL, which is critical
for OAuth callback URLs generated by Ueberauth.

Opt-in via `config :phoenix_kit, sync_site_url_to_endpoint: true`.

# `sync`

```elixir
@spec sync() :: :ok
```

Syncs `site_url` from settings to the parent Endpoint's `:url` config.

No-op when `sync_site_url_to_endpoint` is `false` (the default),
when `site_url` is empty, or when the parent endpoint cannot be resolved.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
