Add OAuth device code flow#2352
Conversation
…feature/oauth-device-flow
|
/preview |
|
Preview deployed
|
- Mark optional build dependencies as dev in `package-lock.json` - Remove obsolete libc qualifiers from lock entries
…flow # Conflicts: # src/Exceptionless.Web/ClientApp/package-lock.json
|
Follow-up feedback and thermo-nuclear audit complete. Feedback classification
Proven RCA and surgical fixThe full branch-vs-main audit found one real cache-ownership race. A stale user-code lookup read owner A, failed to find A's device authorization, and then unconditionally deleted the shared user-code key. If that key had been reassigned to owner B between the read and cleanup, A could delete B's valid mapping. Commit Thermo-nuclear diff auditAudited the complete effective diff against Verification
A local integration-host attempt was blocked before the test body by unrelated shared Elasticsearch No external blocker remains. Draft/admin state was not changed. |
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
urn:ietf:params:oauth:grant-type:device_codesupport, authorization server metadata, device authorization, consent, approve, deny, and token exchange endpoints.grant_typesacross models, dynamic registration, repository mapping, admin API, and admin UI./next/oauth/deviceverification flow with manual code entry andverification_uri_completesupport.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.OAuthControllerTestsdotnet test --project tests/Exceptionless.Tests/Exceptionless.Tests.csproj -- --filter-class Exceptionless.Tests.Controllers.OAuthApplicationControllerTestsdotnet build --no-restore -v:qcd src/Exceptionless.Web/ClientApp; npm run buildgit diff --check