feat: support Interactive Authorization flow#736
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for the OID4VCI Interactive Authorization flow by extending the credential-offer handling to initiate interactive authorization (when supported by the Authorization Server), prompting the user to share credentials, sending the interactive follow-up, and then continuing with the token request. This PR also refactors backend state tracking by consolidating multiple core_utils.active_* fields into a single active_flow context that can represent SIOPv2, OID4VP, and OID4VCI offer stages.
Changes:
- Introduces an interactive-authorization path in
send_credential_request, plus a new reducer to send the interactive follow-up and resume the OID4VCI flow. - Refactors backend state to store active flow context in
CoreUtils.active_flow(replacing several dedicatedactive_*fields). - Propagates a new
is_interactiveflag through prompts/actions and the frontend dispatch path.
Reviewed changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| unime/src/routes/prompt/share-credentials/+page.svelte | Includes is_interactive in the credentials-selected action payload. |
| unime/src/routes/prompt/credential-offer/+page.svelte | Alters destroy-time cancellation behavior for the credential-offer prompt. |
| unime/src/routes/+layout.svelte | Extends code-received dispatch payload with is_interactive. |
| identity-wallet/src/state/user_prompt.rs | Adds is_interactive to the ShareCredentials prompt payload. |
| identity-wallet/src/state/qr_code/reducers/read_credential_offer.rs | Stores OID4VCI offer context using the new active_flow structure. |
| identity-wallet/src/state/qr_code/reducers/read_authorization_request.rs | Migrates connection/authorization-request state to active_flow; sets prompt is_interactive. |
| identity-wallet/src/state/mod.rs | Updates state serialization comment to reflect core_utils skipping. |
| identity-wallet/src/state/dev_mode/reducers/dragon_dynamic_profile.rs | Updates dev-mode “share credentials” action to include is_interactive. |
| identity-wallet/src/state/credentials/reducers/send_token_request.rs | Consumes new active_flow context; adjusts state validation behavior for interactive flow. |
| identity-wallet/src/state/credentials/reducers/send_interactive_authorization_request_follow_up.rs | New reducer: sends interactive follow-up request, records history/connection, resumes token request. |
| identity-wallet/src/state/credentials/reducers/send_credential_request.rs | Adds interactive authorization initiation and credential-selection prompt for interactive follow-up. |
| identity-wallet/src/state/credentials/reducers/refresh_credential_status.rs | Switches key-id resolution helper import to oid4vc-core utility. |
| identity-wallet/src/state/credentials/reducers/mod.rs | Exposes the new interactive follow-up reducer module. |
| identity-wallet/src/state/credentials/reducers/handle_oid4vp_authorization_request.rs | Extracts shared OID4VP token/history-building and history/connection update utilities; gates reducer on is_interactive. |
| identity-wallet/src/state/credentials/mod.rs | Switches JWT-claims helper import to oid4vc-core utility. |
| identity-wallet/src/state/credentials/actions/credentials_selected.rs | Adds is_interactive and dispatches both OID4VP handling + interactive follow-up reducers. |
| identity-wallet/src/state/credentials/actions/authorization_code_received.rs | Adds is_interactive to code-received action. |
| identity-wallet/src/state/core_utils/mod.rs | Introduces ActiveFlow and Oid4vciStage enums; replaces multiple active fields with active_flow. |
| identity-wallet/src/state/core_utils/helpers.rs | Removes local JWT helper utilities in favor of oid4vc-core utilities; updates key-id resolution usage. |
| identity-wallet/src/state/connections/reducers/handle_siopv2_authorization_request.rs | Reads SIOPv2 authorization request from active_flow. |
| identity-wallet/src/state/common/mod.rs | Updates tests to include is_interactive in ShareCredentials prompt construction. |
| identity-wallet/bindings/user_prompt/CurrentUserPrompt.ts | Updates generated binding for ShareCredentials prompt to include is_interactive. |
| identity-wallet/bindings/actions/CredentialsSelected.ts | Updates generated binding to include is_interactive. |
| identity-wallet/bindings/actions/CodeReceived.ts | Updates generated binding to include is_interactive. |
| Cargo.toml | Bumps oid4vc git revision; removes workspace package name field. |
| Cargo.lock | Updates lockfile for the bumped oid4vc revision and dependency changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a13bd7a to
b02d2ca
Compare
Oran-Dan
left a comment
There was a problem hiding this comment.
looks good! a few minor comments to resolve
Oran-Dan
left a comment
There was a problem hiding this comment.
Looks good from my side. Only comment left will be addressed by Daniel
Description of change
Adds support for the Interactive Authorization flow as described here.
Links to any relevant issues
How the change has been tested
Manually tested, for more details, see: https://github.com/impierce/ssi-agent-integration-server
Definition of Done checklist
Add an
xto the boxes that are relevant to your changes.