Skip to main content

Integration of VIDwallet

This integration guide helps you to integrate your mobile app with VIDwallet. If you need to perform a login authentication with VIDwallet from a mobile app, i.e. in the same device, you can interact with the VIDwallet through this app to app integration.

You can use the component did-siop to request credentials from the VIDwallet. It is available at npm.

did-siop is a library written in Typescript that implements the OpenID Connect SIOP flow.

siop

The current DID Auth implementation follows DID SIOP Auth, which uses two JSON Web Tokens (JWT) signed by both two parties DID keys in a double challenge-response authentication. It is also supported the protocol to exchange Verifiable Credentials as part of the ID token response.

Installation​

Installation using bash:

npm install @validatedid/did-auth

Installation using yarn:

yarn add @validatedid/did-auth

Verifiable Credential Exchange​

This is the high-level flow of the steps required to exchange credentials:

siop-vc-exchange

Steps:

  1. You need an VIDcredentials API Key! Contact us, we'll create and provide it to you.
  2. All calls to our API need to be authenticated. Use the VIDcredentials API Key to request an authentication JWT.
  3. Prepare your request to the wallet (need to sign it before sending), see the details in our library documentation.
  4. Request the credentials you want to get in your app in the wallet. You need to provide the Credential Types you are requesting, and the "callback" url (a deep-link, so remember to register your deep-link from your app).
  5. Almost done! You'll get a "callback" with the Verifiable Presentation with the requested credentials.
  6. Optional but more than highly recommended. Do a quick call to our VIDcredentials API to verify the signature of the Verifiable Presentation and the claims we handed to you.

And voilà! You completed a full credential exchange. You have the credentials, use and keep them wisely!

Check the package documentation to get more detailed instructions in how to integrate it with your app