Repository navigation
fix: expose client_id in device flow discovery response - #251
Merged
Merged
Conversation
Add client_id to device flow configuration
🦋 Changeset detectedLatest commit: 2e5fcf9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 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 |
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
Contributor
Author
|
recheck |
Contributor
Author
|
fixes #157 |
Contributor
There was a problem hiding this comment.
Pull request overview
Exposes the CLI OAuth Device Flow client_id in the /_emdash/.well-known/auth discovery response so clients can reliably initiate the device authorization flow without hardcoding the value.
Changes:
- Add
client_id: "emdash-cli"to theauth.methods.device_flowobject in the discovery endpoint response.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ascorbic
enabled auto-merge (squash)
April 11, 2026 10:42
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/blocks
@emdash-cms/cloudflare
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
fmhall
pushed a commit
to fmhall/emdash
that referenced
this pull request
Apr 13, 2026
* Add client_id to device flow configuration * chore: add changeset --------- Co-authored-by: Matt Kane <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The
/_emdash/.well-known/authdiscovery endpoint was missingclient_idfrom thedevice_flowobject. The CLI needs this value to initiate the device authorization flow — without it, GitHub device flow authentication fails. The CLI already used"emdash-cli"as a hardcoded fallback; this makes it the canonical advertised value in the discovery response.Closes #157
Type of change
Checklist
pnpm typecheckpassespnpm --silent lint:json | jq '.diagnostics | length'returns 0pnpm testpasses (or targeted tests for my change)pnpm formathas been runAI-generated code disclosure
Screenshots / test output
One line added to
packages/core/src/astro/routes/api/well-known/auth.ts:device_flow: !isExternal ? { + client_id: "emdash-cli", device_authorization_endpoint: "/_emdash/api/oauth/device/code", token_endpoint: "/_emdash/api/oauth/device/token", } : undefined,