Skip to content

feat: implement local dev for ctx.access - #15113

Merged
petebacondarwin merged 1 commit into
cloudflare:mainfrom
BSFishy:ctx-access-local
Aug 13, 2026
Merged

feat: implement local dev for ctx.access#15113
petebacondarwin merged 1 commit into
cloudflare:mainfrom
BSFishy:ctx-access-local

Conversation

@BSFishy

@BSFishy BSFishy commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Fixes AUTH-8942.

Adds support for mocking ctx.access locally for development. Currently we just mock static values although the infrastructure is there to eventually pull real info from production Access or enhance with a more sophisticated mock.

wrangler.jsonc

{
	"access": {
		"dev": {
			"aud": "my-app-aud-tag",
			"identity": {
				"email": "user@example.com",
				"name": "Test User"
			}
		}
	}
}

obligatory cat picture

image

@changeset-bot

changeset-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bb46bcb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
miniflare Minor
wrangler Minor
@cloudflare/deploy-helpers Patch
@cloudflare/pages-shared Patch
@cloudflare/remote-bindings Patch
@cloudflare/runtime-types Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch

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

@BSFishy
BSFishy force-pushed the ctx-access-local branch 3 times, most recently from cdaeef8 to 1fc454f Compare August 10, 2026 16:51
@BSFishy
BSFishy marked this pull request as ready for review August 10, 2026 16:52
@workers-devprod
workers-devprod requested review from a team and NuroDev and removed request for a team August 10, 2026 16:52
@workers-devprod

workers-devprod commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@pkg-pr-new

pkg-pr-new Bot commented Aug 10, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@15113

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@15113

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@15113

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@15113

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@15113

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@15113

miniflare

npm i https://pkg.pr.new/miniflare@15113

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@15113

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@15113

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@15113

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@15113

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@15113

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@15113

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@15113

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@15113

wrangler

npm i https://pkg.pr.new/wrangler@15113

commit: bb46bcb

devin-ai-integration[bot]

This comment was marked as resolved.

@petebacondarwin petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good so far. Please can you address the Devin comments, which seem valid.

Comment thread packages/miniflare/src/runtime/config/generated/workerd.ts
@BSFishy
BSFishy force-pushed the ctx-access-local branch 2 times, most recently from 7439059 to 91bce65 Compare August 10, 2026 20:50
devin-ai-integration[bot]

This comment was marked as resolved.

@petebacondarwin

Copy link
Copy Markdown
Contributor

We should probably block this PR on #15131

@petebacondarwin petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming the CI jobs are happy.

@petebacondarwin

Copy link
Copy Markdown
Contributor

I assume CI will fail due to the changes needed to land the latest workerd with the default nodejs_compat change.
I'll try to land #15123 instead

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Aug 11, 2026
@petebacondarwin

Copy link
Copy Markdown
Contributor

We've landed the workerd bump and so I have rebased this PR.

@BSFishy
BSFishy force-pushed the ctx-access-local branch 4 times, most recently from 3cbf95f to fb63563 Compare August 12, 2026 16:11
devin-ai-integration[bot]

This comment was marked as resolved.

@petebacondarwin
petebacondarwin removed the request for review from NuroDev August 12, 2026 20:37
Signed-off-by: Matt Provost <mprovost@cloudflare.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 6 additional findings in Devin Review.

Open in Devin Review

Comment thread packages/miniflare/src/plugins/core/index.ts
@petebacondarwin
petebacondarwin merged commit b8fd112 into cloudflare:main Aug 13, 2026
59 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Aug 13, 2026
@BSFishy
BSFishy deleted the ctx-access-local branch August 13, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants