[workers-auth] Update cf OAuth device flow and scopes - #15623
Conversation
🦋 Changeset detectedLatest commit: b2bf60e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Codeowners approval required for this PR:
Show detailed file reviewers |
|
LGTM |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/codemods
@cloudflare/config
@cloudflare/containers-shared
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-plugin
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
Follow-up in 9644e79 strengthens the implicit-login path: |
|
Scope follow-up in c2f5ba2 uses the deployed production registration as an explicit-request allowlist while preserving the existing 88 default scopes exactly. This makes new OAuth labels such as |
|
CI is now fully green at |
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
ce240d6 to
b2bf60e
Compare
Supports https://github.com/cloudflare/cf/issues/7.
What changed
CliDescriptor.useDeviceFlowByDefaultsetting. The cf descriptor enables it for explicit login and implicit login during account resolution; explicitdevice: falsestill opts out, and Wrangler keeps its localhost callback default./accountsand/membershipsdiscovery requests, preventing an unresolved account from starting two device codes.dns.read; the API-token role labeldns_readremains invalid.This belongs in workers-auth because account resolution can initiate OAuth through
loginOrRefreshIfRequiredwithout passing through cf's login-command facade. Registration and default permissions remain separate: broader scopes are available only when a caller explicitly supplies them.Verification
pnpm check, and build passA picture of a cute animal (not mandatory, but encouraged)