eu-digital-identity-wallet / eudi-srv-web-issuing-eudiw-py

APIs and code of the eudiw provider backend PID, mDL and EAA issuer following OID4VCI
Apache License 2.0
18 stars 19 forks source link

Deferred issuance based on PID-presentation fails #42

Closed potential-nl-blsp closed 1 month ago

potential-nl-blsp commented 2 months ago

Deferred issuance using the issuer at https://issuer.eudiw.dev works if choosing the "Country selection / formEU"-option to compose the attestation. Deferred issuance of this attestation works.

However, when choosing the PID-option, the issuer service asks for the user's PID, and, when presented, and shows the proposed data in the browser. When authorizing the issuance of this data in an attestation, the wallet app responds with an "Oops something went wrong message."

App version: 2024.08.13.Demo on Android

PS: the attestation is wrongly named "PID" in the app, but this seems to be an incorrect label in a configuration file.

potential-nl-blsp commented 2 months ago

After some analysis it appears that some data is removed from memory prematurely by the scheduler, as it cannot find the timestamp the data was stored and it then assumes the timestamp is 0. datetime.now() minus timestamp then exceeds the threshold and the item is deleted before proper issuance has taken place. (Occasionally it may work due to lucky timing.).

Solution can be to set the timestamp of the item when storing it in memory, in app/route_oid4vp.py, getpidoid4vp().