This integration guide helps you to integrate your mobile app with VIDwallet. This might be of your interest if you want to interact directly from your mobile with VIDwallet either for authenticating a user or to request a verifiable presentation. If that's the case, please follow this integration guide.
In short, if you rely on a NodeJS friendly technology, we recommend you to use our library available at
npm. Otherwise, check the last section on how to implement this integration on your own.
Using @validateid/did-auth library
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.
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.
npm install @validatedid/did-auth
yarn add @validatedid/did-auth
Verifiable Credential Exchange
This is the high-level flow of the steps required to exchange credentials:
- You need an VIDcredentials API Key! Contact us, we'll create and provide it to you.
- All calls to our API need to be authenticated. Use the VIDcredentials API Key to request an authentication JWT.
- Prepare your request to the wallet (need to sign it before sending), see the details in our library documentation.
- 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).
- Almost done! You'll get a "callback" with the Verifiable Presentation with the requested credentials.
- 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
If you can't take advantage of our library, do not worry. We have developed an iOS app example integrated with VIDwallet. You can find it in this public repository.