github cloudflare/workers-sdk @cloudflare/workers-auth@0.2.0

6 hours ago

Minor Changes

  • #14185 98c9afe Thanks @penalosa! - Make the OAuth identity and token storage injectable, and add a shared env-credential resolver

    createOAuthFlow now takes the consumer's OAuth identity (clientId, consent, redirectUri) and token storage on its context, so other Cloudflare CLIs can reuse the flow under their own OAuth app and store tokens in their own location/format. Also adds a shared env→credential resolver (getAuthFromEnv, getAPIToken, requireApiToken).

Patch Changes

  • #14213 10b5538 Thanks @dario-piotrowicz! - Improve authentication error messages with specific failure reasons

    When authentication fails (e.g. during wrangler dev --remote or when using remote bindings), the error message now explains exactly what went wrong -- whether no credentials were found, the token expired, or the environment is non-interactive -- and lists actionable steps to fix it, including a wrangler whoami tip.

    Previously, auth failures could produce multiple confusing errors (e.g. "Failed to fetch auth token: 400 Bad Request" followed by "Failed to start the remote proxy session"). Now a single, clear error is shown.

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.