Skip to content
Docs
Changelog

Changelog

New features, architectural changes and improvements to the template.

MarkdownRSS

Release notes are curated from repository history. Dates reflect integration into the main branch; grouped entries are not semantic-version tags. Each entry links to its implementation and current developer guide.

The Worker entry forwards the request id and the client address

One module derives a request's id and trusted client address, the Worker entry calls it once and every handler receives the result; a test keeps cf-ray and cf-connecting-ip out of handlers.

  • One place derives, the entry forwards. deriveRequestFacts in packages/auth/src/request-runtime.ts reads Cloudflare's ray id and the client address (cf-connecting-ip on Workers, the configured proxy hop or the socket on Node). apps/web/src/server.ts calls it once per request and hands the result to the request runtime; the oRPC and MCP contexts, the Better Auth handler, the analytics relay and the Web Vitals limiter ask requestFacts(request). Rate limits, audit rows and the x-request-id header keep their values. See backend conventions. (48467b8)
  • Two readers now agree with the rest. The Web Vitals limiter read cf-connecting-ip itself; it counts under the same trusted address as every other limit (unchanged on Workers, where the limiter runs). An unhandled error reported to the tracker was tagged with the ray id only when Cloudflare sent one; it now carries the request id of the x-request-id header in every case (tagRequest).
  • A smaller interface. createAuth(...).handler no longer takes trustedClientIp: a request built in-process for the one being served (the MCP JWKS read) is counted under that request's address without the caller passing it. @template-cloudflare/auth/client-ip is no longer exported; @template-cloudflare/auth/request-runtime is, and W17 now lists two web modules with backend access, since server.ts only needs the runtime.
  • A test keeps it that way. scripts/request-facts.test.mjs fails when another module reads cf-ray or cf-connecting-ip, or when anything but the entry calls deriveRequestFacts.

HTTP edges live in packages/api; web routes only mount

The files gateway, the MCP resource server, OAuth discovery, the RPC handler and the Better Auth handler moved behind request handlers in packages/api. Three web modules own server-side backend access, and a test keeps it that way.

  • API routes are mounts. apps/web/src/routes/api/{rpc,files,mcp,auth} and the OAuth discovery routes under /.well-known are now a few lines each: they pass the request to a (request: Request) => Promise<Response> handler from @template-cloudflare/api/<feature>/http, as the billing and assistant routes already did. The session, membership, tenant and storage code they held is in packages/api (platform/rpc/http.ts, features/files/files.http.ts, features/mcp/mcp.http.ts, features/auth/auth.http.ts), under the backend's lint rules and next to its tests. No URL, status or header changed. (d8fa292)
  • Three web modules own backend access (W17). Only platform/rpc/orpc.ts, platform/auth/read-session.server.ts and server.ts value-import the router, auth, db or storage; 13 web files did before. scripts/web-feature-boundaries.test.mjs fails on any other importer. See web conventions.
  • A smaller package interface. @template-cloudflare/api no longer exports ./membership, ./uploads/service, ./documents/lifecycle-plugin and ./mcp/{server,context,protocol,guard}; nothing outside the package needs them now. A fork that imported one of them from its own web code moves that code into a <feature>.http.ts.

Sign up and sign in with Google and Apple

Google and Apple ship off and switch on per project with their environment variables. Apple's client secret signs itself, social sign-ups get the same Organization and records as email sign-ups, and the app signs in natively with Apple on iOS.

  • New: social sign-in, off by default. Better Auth registers Google when GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET are set, and Apple when all five APPLE_* variables are set; half a provider stays off and is logged once. Nothing is project-specific, and a fresh project shows no buttons. See Social sign-in. (1e8a7f6, 5c9d90b)
  • Apple's client secret signs itself. The server signs the ES256 JWT Apple requires from the .p8 key with Web Crypto, valid 30 days, cached per isolate and renewed a day before it expires, so nobody rotates it. Checked on the built Worker in local workerd and in Node tests. https://appleid.apple.com is a trusted origin while Apple is on, for its form post callback. (5c9d90b)
  • The same account either way. A Google or Apple sign-up goes through the same hooks as an email sign-up: personal Organization, owner membership, user.created, org.created and auth.sign_in audits, the Active Organization on the Session, and one welcome email. An integration test compares the three paths on a local Postgres. (5c9d90b)
  • Linking only by a verified address. Google or Apple joins an existing User only when the provider vouches for the address and the User has verified it too. An unverified password account gets account_not_linked instead of being taken over, and a User with two-factor on gets no social Session (TWO_FACTOR_REQUIRED) because Better Auth's challenge covers credential sign-ins only. Apple's name, sent only on the first authorization, is kept; without one the address's local part stands in. See Accounts and linking. (5c9d90b)
  • Clients show only what is on. appConfig.get lists auth.socialProviders (names only, also in its fallback), and the web sign-in and sign-up pages render "Continue with Google / Apple" from it on the first paint, with each brand's mark, a spinner while the browser leaves and a message when the provider sends the person back with an error. (cf2459e, c71367e)
  • Mobile. On iOS the app uses the native Sign in with Apple sheet and sends its identity token with a nonce: the server refuses an Apple token without one. Google goes through the Expo plugin's browser flow. App Store guideline 4.8 is in the button logic: on iOS Google shows only next to Apple. expo-apple-authentication and expo-crypto are native modules, so rebuild the development client. (e8d4919)
  • Setup. pnpm setup offers both providers, reads the Apple key from its .p8 file, refuses half a provider, and --worker-secrets publishes them as Worker secrets; pnpm doctor names missing variables. The auth guide has the Google Cloud and Apple Developer console steps. (b1e05de, 2bc6da7)

Earlier releases

Edit on GitHubDocumentation is in English.
Cookie settings
We use essential cookies to make our app work. With your consent, we also use optional cookies to improve your experience.

Read our Cookie Policy and Privacy Policy.