Skip to content

Add OAuth device code flow#2352

Draft
ejsmith wants to merge 7 commits into
mainfrom
feature/oauth-device-flow
Draft

Add OAuth device code flow#2352
ejsmith wants to merge 7 commits into
mainfrom
feature/oauth-device-flow

Conversation

@ejsmith

@ejsmith ejsmith commented Jul 6, 2026

Copy link
Copy Markdown
Member

Summary

Adds RFC 8628-style OAuth device authorization for remote and headless MCP/OAuth clients. Device clients can request a device/user code, users can approve access through the Svelte verification page, and token polling now returns the expected pending, slow_down, denied, expired, or token responses.

Changes

  • Added urn:ietf:params:oauth:grant-type:device_code support, authorization server metadata, device authorization, consent, approve, deny, and token exchange endpoints.
  • Stores pending device authorizations in cache with opaque device codes, normalized user-code lookup, expiration, polling interval enforcement, and one-time consumption.
  • Added persisted OAuth application grant_types across models, dynamic registration, repository mapping, admin API, and admin UI.
  • Added Svelte /next/oauth/device verification flow with manual code entry and verification_uri_complete support.
  • Updated OAuth HTTP samples, AI tools copy, controller tests, admin tests, and OpenAPI baseline.

Compatibility

Existing authorization-code clients continue to default to authorization_code refresh_token. Authorization-code clients still require redirect URIs; device-only clients may omit redirects.

Validation

  • dotnet test --project tests/Exceptionless.Tests/Exceptionless.Tests.csproj -- --filter-class Exceptionless.Tests.Controllers.OAuthControllerTests
  • dotnet test --project tests/Exceptionless.Tests/Exceptionless.Tests.csproj -- --filter-class Exceptionless.Tests.Controllers.OAuthApplicationControllerTests
  • dotnet build --no-restore -v:q
  • cd src/Exceptionless.Web/ClientApp; npm run build
  • OpenAPI baseline snapshot regenerated and verified
  • git diff --check

ejsmith commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

/preview

@github-actions github-actions Bot added the dev-preview Deploy this pull request to the shared dev environment. label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Preview deployed

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.AppHost 39% 40% 132
Exceptionless.Core 72% 64% 8824
Exceptionless.Insulation 24% 23% 205
Exceptionless.Web 79% 67% 5258
Summary 73% (17492 / 24094) 64% (8898 / 13868) 14419

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev-preview Deploy this pull request to the shared dev environment.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant