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:
private fun createCoroutineContext(...) —
|
private fun createCoroutineContext( |
internal inner class ProvisioningEnvironment(...) —
|
internal inner class ProvisioningEnvironment( |
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
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.launchlooks like the entry point for this — it takes adocumentparameter for exactly that purpose:multipaz/multipaz/src/commonMain/kotlin/org/multipaz/provisioning/ProvisioningModel.kt
Line 212 in 145e9e1
but it requires a
CoroutineContextthat only the library can build:private fun createCoroutineContext(...)—multipaz/multipaz/src/commonMain/kotlin/org/multipaz/provisioning/ProvisioningModel.kt
Line 332 in 145e9e1
internal inner class ProvisioningEnvironment(...)—multipaz/multipaz/src/commonMain/kotlin/org/multipaz/provisioning/ProvisioningModel.kt
Line 391 in 145e9e1
The
launchOpenID4VCIProvisioningoverloads that can build that context do not accept a target document, andlaunchOpenID4VCIRefreshCredentialsrequires 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
documentparameter to thelaunchOpenID4VCIProvisioningoverloads, or make the coroutine-context construction public (a factory takingclientPreferences+backend), solaunch(context, document = existing)becomes usable from outside the library.Related