animo / paradym-wallet

With Paradym Wallet, you can seamlessly manage and present your digital credentials
https://paradym.id
Apache License 2.0
30 stars 10 forks source link

Credential information could not be extracted / Couldn't receive credential from OpenID4VCI offer #75

Closed jack-robson closed 10 months ago

jack-robson commented 10 months ago

I don't think the app is working as you expect.

Steps to reproduce:

  1. Run latest version in Expo (or use Play Store app)
  2. Scan in this QR

qr_1_65

This produces the "Credential information could not be extracted" error inside the app.

Note, the QR seems valid as I've managed to scan it into a different wallet app. And I got it from https://launchpad.mattrlabs.com/.

I've also tried many QRs, all produce the same error.

Looking at the expo logs, it says


}
 DEBUG  DEBUG: Connecting to WebSocket wss://mediator.dev.paradym.id/didcomm
 DEBUG  DEBUG: Successfully connected to WebSocket wss://mediator.dev.paradym.id/didcomm
 LOG  START fetching url: https://launchpad.vii.electron.mattrlabs.io/.well-known/openid-credential-issuer
 LOG  success status: 200, body:
{"issuer":"https://launchpad.vii.electron.mattrlabs.io","authorization_endpoint":"https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/authorize","token_endpoint":"https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/token","jwks_uri":"https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/jwks","token_endpoint_auth_methods_supported":["none","client_secret_basic","client_secret_jwt","client_secret_post","private_key_jwt"],"code_challenge_methods_supported":["S256"],"grant_types_supported":["authorization_code","urn:ietf:params:oauth:grant-type:pre-authorized_code"],"response_modes_supported":["form_post","fragment","query"],"response_types_supported":["code id_token","code","id_token","none"],"scopes_supported":["OpenBadgeCredential","PermanentResidentCard","AcademicAward","LearnerProfile"],"token_endpoint_auth_signing_alg_values_supported":["HS256","RS256","PS256","ES256","EdDSA"],"credential_endpoint":"https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/credential","credentials_supported":[{"id":"a09382b7-4345-4396-b86b-bcb3ba6e6716","format":"ldp_vc","types":["VerifiableCredential","OpenBadgeCredential"],"cryptographic_binding_methods_supported":["did:key"],"cryptographic_suites_supported":["Ed25519Signature2018"],"display":[{"name":"Example University Degree","description":"JFF Plugfest 3 OpenBadge Credential","background_color":"#464c49","logo":{"url":"https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png"}}]},{"id":"16ca7226-0ee7-4a42-be3b-c186f75f6218","format":"ldp_vc","types":["VerifiableCredential","PermanentResidentCard"],"cryptographic_binding_methods_supported":["did:key"],"cryptographic_suites_supported":["Ed25519Signature2018"],"display":[{"name":"Permanent Resident Card","description":"Government of Kakapo","background_color":"#3a2d2d","logo":{"url":"https://static.mattr.global/credential-assets/government-of-kakapo/web/logo.svg"}}]},{"id":"9a84a5b5-acfc-4fcf-b8a0-b50930ce72c3","format":"ldp_vc","types":["VerifiableCredential","AcademicAward"],"cryptographic_binding_methods_supported":["did:key"],"cryptographic_suites_supported":["Ed25519Signature2018"],"display":[{"name":"Academic Award","description":"Microcredential from the MyCreds Network.","background_color":"#def4f7","logo":{"url":"https://mycreds.ca/wp-content/uploads/2020/10/Mycreds.ca-Logo.svg"}}]},{"id":"7c47194f-f887-4a85-abd2-46f67f1bc335","format":"ldp_vc","types":["VerifiableCredential","LearnerProfile"],"cryptographic_binding_methods_supported":["did:key"],"cryptographic_suites_supported":["Ed25519Signature2018"],"display":[{"name":"Digitary Learner Profile","description":"Example","background_color":"#f5f5f5","logo":{"url":"https://i.imgur.com/o89yUrl.png"}}]},{"id":"613ecbbb-0a4c-4041-bb78-c64943139d5f","format":"jwt_vc_json","types":["VerifiableCredential","OpenBadgeCredential"],"cryptographic_binding_methods_supported":["did:key"],"cryptographic_suites_supported":["EdDSA"],"display":[{"name":"Example University Degree","description":"JFF Plugfest 3 OpenBadge Credential","background_color":"#464c49","logo":{"url":"https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png"}}]},{"id":"c3db5513-ae2b-46e9-8a0d-fbfd0ce52b6a","format":"jwt_vc_json","types":["VerifiableCredential","PermanentResidentCard"],"cryptographic_binding_methods_supported":["did:key"],"cryptographic_suites_supported":["EdDSA"],"display":[{"name":"Permanent Resident Card","description":"Government of Kakapo","background_color":"#3a2d2d","logo":{"url":"https://static.mattr.global/credential-assets/government-of-kakapo/web/logo.svg"}}]},{"id":"e4e8ffec-54e1-412e-82c7-8faaaa34f585","format":"jwt_vc_json","types":["VerifiableCredential","AcademicAward"],"cryptographic_binding_methods_supported":["did:key"],"cryptographic_suites_supported":["EdDSA"],"display":[{"name":"Academic Award","description":"Microcredential from the MyCreds Network.","background_color":"#def4f7","logo":{"url":"https://mycreds.ca/wp-content/uploads/2020/10/Mycreds.ca-Logo.svg"}}]},{"id":"2ae327ed-7b40-483c-a046-86a4dfa633df","format":"jwt_vc_json","types":["VerifiableCredential","LearnerProfile"],"cryptographic_binding_methods_supported":["did:key"],"cryptographic_suites_supported":["EdDSA"],"display":[{"name":"Digitary Learner Profile","description":"Example","background_color":"#f5f5f5","logo":{"url":"https://i.imgur.com/o89yUrl.png"}}]}]}
 LOG  START fetching url: https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/token
 LOG  error status: 400, body:
{"error":"invalid_grant","error_description":"grant request is invalid"}
 ERROR  ERROR: Couldn't receive credential from OpenID4VCI offer {
  "error": {
    "name": "Error",
    "stack": "Error: Retrieving an access token from https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/token for issuer https://launchpad.vii.electron.mattrlabs.io failed with status: 400\n    at ?anon_0_ (http://192.168.0.18:8081/index.bundle//&platform=android&dev=true&minify=false&app=id.paradym.wallet.dev&modulesOnly=false&runModule=true:625310:26)\n    at next (native)\n    at fulfilled (http://192.168.0.18:8081/index.bundle//&platform=android&dev=true&minify=false&app=id.paradym.wallet.dev&modulesOnly=false&runModule=true:625097:30)\n    at tryCallOne (/root/react-native/packages/react-native/ReactAndroid/hermes-engine/.cxx/Release/554c6x4t/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:53:16)\n    at anonymous (/root/react-native/packages/react-native/ReactAndroid/hermes-engine/.cxx/Release/554c6x4t/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:139:27)\n    at apply (native)\n    at anonymous (http://192.168.0.18:8081/index.bundle//&platform=android&dev=true&minify=false&app=id.paradym.wallet.dev&modulesOnly=false&runModule=true:39248:26)\n    at _callTimer (http://192.168.0.18:8081/index.bundle//&platform=android&dev=true&minify=false&app=id.paradym.wallet.dev&modulesOnly=false&runModule=true:39127:17)\n    at _callReactNativeMicrotasksPass (http://192.168.0.18:8081/index.bundle//&platform=android&dev=true&minify=false&app=id.paradym.wallet.dev&modulesOnly=false&runModule=true:39172:17)\n    at callReactNativeMicrotasks (http://192.168.0.18:8081/index.bundle//&platform=android&dev=true&minify=false&app=id.paradym.wallet.dev&modulesOnly=false&runModule=true:39378:44)\n    at __callReactNativeMicrotasks (http://192.168.0.18:8081/index.bundle//&platform=android&dev=true&minify=false&app=id.paradym.wallet.dev&modulesOnly=false&runModule=true:3465:46)\n    at anonymous (http://192.168.0.18:8081/index.bundle//&platform=android&dev=true&minify=false&app=id.paradym.wallet.dev&modulesOnly=false&runModule=true:3239:45)\n    at __guard (http://192.168.0.18:8081/index.bundle//&platform=android&dev=true&minify=false&app=id.paradym.wallet.dev&modulesOnly=false&runModule=true:3438:15)\n    at flushedQueue (http://192.168.0.18:8081/index.bundle//&platform=android&dev=true&minify=false&app=id.paradym.wallet.dev&modulesOnly=false&runModule=true:3238:21)\n    at invokeCallbackAndReturnFlushedQueue (http://192.168.0.18:8081/index.bundle//&platform=android&dev=true&minify=false&app=id.paradym.wallet.dev&modulesOnly=false&runModule=true:3232:33)",
    "message": "Retrieving an access token from https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/token for issuer https://launchpad.vii.electron.mattrlabs.io failed with status: 400"
  }
}
TimoGlastra commented 10 months ago

Could you try running it from #71?

This should support the latest version of MATTR Launchpad (with Jwt format). We'll merge this soon when some underlying dependencies are updated

jack-robson commented 10 months ago

Could you try running it from #71?

This should support the latest version of MATTR Launchpad (with Jwt format). We'll merge this soon when some underlying dependencies are updated

this worked, tyvm 🙏

TimoGlastra commented 10 months ago

Will close as the specific issue was resolved. Please open another issue if you run into any other problems :)