Skip to content

Make server callbackUri optional for DC API requests with expectedOrigins - #52

Merged
frostevent merged 1 commit into
mainfrom
jeremie/optional-callback-uri
Sep 24, 2026
Merged

frostevent merged 1 commit into
mainfrom
jeremie/optional-callback-uri

Conversation

@frostevent

Copy link
Copy Markdown
Collaborator

Summary

signedDcApiRequest with expectedOrigins never reads config.callbackUri, so clients had to configure callbackUri: "" just to satisfy the type checker.

  • ServerClientConfig.callbackUri is now optional. The frontend ClientConfig in proof-vc-common still requires it.
  • authorizationUrl and signedAuthorizationRequest reject with a clear error when callbackUri is missing.
  • signedDcApiRequest rejects when neither expectedOrigins nor callbackUri is provided.
  • signedRequest is now async, so signedAuthorizationRequest returns a rejected promise instead of throwing synchronously when its params are invalid.
  • README: documents when to use expectedOrigins vs. callbackUri for DC API requests.

Existing clients that pass callbackUri are unaffected.

Tests

  • Added: DC API with expectedOrigins and no callbackUri succeeds; DC API with neither is rejected; authorizationUrl / signedAuthorizationRequest without callbackUri are rejected.
  • yarn test and yarn check-all pass.

🤖 Generated with Claude Code

…gins

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@frostevent
frostevent enabled auto-merge (squash) September 24, 2026 13:43
@frostevent
frostevent disabled auto-merge September 24, 2026 13:43
@frostevent
frostevent merged commit 09aec18 into main Sep 24, 2026
10 checks passed
@frostevent
frostevent deleted the jeremie/optional-callback-uri branch September 24, 2026 13:43
@frostevent frostevent mentioned this pull request Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant