Skip to content

No public API to re-authorize provisioning into an existing DocumentProvisioningModel.launch's coroutine context cannot be constructed outside the library #1950

Description

@mc1100

Version: observed on 0.99.0; re-checked against main @ 145e9e1a — unchanged.

What is missing

When a stored refresh token has expired or been rejected, a wallet needs to send the user back through the browser authorization flow into the document it already has, rather than issuing a second copy. ProvisioningModel.launch looks like the entry point for this — it takes a document parameter for exactly that purpose:

but it requires a CoroutineContext that only the library can build:

The launchOpenID4VCIProvisioning overloads that can build that context do not accept a target document, and launchOpenID4VCIRefreshCredentials requires authorization data that is, in this scenario, exactly what has stopped working.

Why it matters

The reference EUDI Android wallet exposes this as allowAuthorizationFallback = true: if the silent refresh fails, fall back to an interactive authorization against the same document. There is no way to express that on top of multipaz today; the choice is a dead document or a duplicate one.

Suggested fix

Either add a document parameter to the launchOpenID4VCIProvisioning overloads, or make the coroutine-context construction public (a factory taking clientPreferences + backend), so launch(context, document = existing) becomes usable from outside the library.

Related

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions