Add a first-party Cloudflare connection so a repository admin can click Connect Cloudflare, authorize a scoped OAuth application, choose an account and Worker, and enable deployment after required checks pass.
Use Cloudflare's self-managed OAuth clients. Keep access and refresh tokens in Source's vault, refresh them outside job containers, support disconnect and revocation, and let protected deployment jobs use placeholders through the outbound handler. Pull requests must never gain production credentials. Keep repositories, build output and container images private.
The current protected CLOUDFLARE_API_TOKEN secret remains the supported setup until this is implemented. Connecting the integration should replace that manual setup without changing the repository's workflow or deployment gates.
Cloudflare docs: https://developers.cloudflare.com/changelog/post/2026-06-03-public-oauth-clients/
Setup for the Cloudflare OAuth test (private client, nothing permanent)
We want to test the OAuth flow before we build it. Four things are not in Cloudflare's docs: whether an OAuth token works for
wrangler deployand for the container registry, how long a token lives, and how we learn which account the person picked. To test them we need a private OAuth client in the TanStack Cloudflare account. My account cannot create one.TanStack Source, client URLhttps://source.tanstack.com, auth methodclient_secret_basic.https://source.tanstack.com/cloudflare-oauth/callbackandhttp://localhost:5173/cloudflare-oauth/callback.