Repository navigation
Conversation
🔀 Cross-SDK feature parity, ports raisedThis pull request is labelled Ports (DO NOT EDIT)
3 of 3 sibling SDKs accounted for. Every sibling SDK is accounted for. The contract is in the SDK development specification. |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Ports for the request-side capability (sending
|
958bc2f to
93d3d28
Compare
93d3d28 to
6cbc020
Compare
Purpose
Adds Rich Authorization Requests (RFC 9396) support to the JavaScript SDKs: clients can request
authorization_detailsand read what was granted, and the React consent UI renders authorization details with the changes a user may make to them.runtime-consent-1.5x.mp4
Approach
@thunderid/javascript, browser, node, express):authorizationDetailsconfig key and per-call option, sent JSON-encoded asauthorization_detailson the authorization request, the CIBA backchannel request (initiateCIBA) and theclient_credentialstoken request.TokenResponse.authorizationDetailsand in session data (nodesignIn, expressonSignIn). Browser apps read the access token'sauthorization_detailsclaim.@thunderid/javascript, react):getConsentElementDecision,getConsentModifiedValues) and form keys scoped by purpose. Field input parsing, validation and list toggling stay private to the React hook, and the display helpers live in React utils.Consent/ConsentCheckboxListsplit, React gets headless pieces (ConsentAuthorizationDetail,useConsentDetailField,isConsentApprovalBlockedandisApprovalBlockedonConsent) and a default UI built on them. A field keeps what the user types, writes a value only when it is valid and within its bound, and shows an inline error otherwise; approval is blocked while a field is invalid, and denial always works.SignIn,BaseAcceptInviteandAuthOptionFactorykeep their existing decision building; detail elements additionally carry the user's changes (modified), and the new form keys are removed before submission. Attribute and permission decisions are unchanged.authorizationDetailson sign-in.Demo
Sign-in from a sample app, the processor adjusting the request, and the consent screen rendered with the new headless pieces: a value outside its policy blocks approval, the user narrows the amount and removes an action, and the token carries only what was approved.
[Video placeholder: drag runtime-consent.mp4 here]
Related Issues
Related PRs
SDK parity
Checklist
breaking changelabel added.parity/prs-raisedorparity/prs-not-neededadded.parity/prs-raised, the port links are posted as a reply on the parity check's comment.Security checks